how to forward logs to CloudWatch? I have AWS cred...
# ask-ai
r
how to forward logs to CloudWatch? I have AWS credentials setup in env variables in livekit cloud
t
Thanks for reaching out, Ivan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
To help you forward logs to AWS CloudWatch from LiveKit Cloud, you'll just need to add a few secrets: • AWS_ACCESS_KEY_ID (required): This is your AWS access key ID. • AWS_SECRET_ACCESS_KEY (required): This is your AWS secret access key. • AWS_REGION (optional): Your AWS region, which defaults to
us-west-2
if you don’t specify one. Once you’ve set these up, all your runtime logs will be smoothly forwarded to your CloudWatch account. If you need any help along the way, feel free to reach out — we’re here for you! Sources: Log collection | LiveKit Docs
r
my cloudwatch log streams are empty
t
Could you please confirm if you've had a chance to complete the following steps? • Have you added the required secrets (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and optionally AWS_REGION) in LiveKit Cloud? • Are the AWS credentials you're using valid and do they have the necessary permissions to write to CloudWatch? • Have you checked whether the logs are being sent to the default region (
us-west-2
) if AWS_REGION wasn’t specified? Whenever you’re ready, just let me know, and I’ll be here to help you out further!
r
yes, I've setup those secrets, I can access S3 bucket, but my logs are not streamed
t
Let's walk through some steps together to help figure out why your CloudWatch log streams might be empty: 1. Verify IAM Permissions: Please double-check that the IAM role linked to your AWS credentials includes the permissions
logs:CreateLogStream
and
logs:PutLogEvents
. These are essential for writing logs to CloudWatch. 2. Check Agent Logs Locally: You can use the LiveKit CLI to see if logs are being generated on your end by running:
livekit-agent logs --agent-id <your-agent-id>
3. Review Build Logs: If you’re not seeing runtime logs, it might help to look at the build logs with:
livekit-agent build-logs --agent-id <your-agent-id>
4. Validate AWS Region: If you haven’t set AWS_REGION, please check the default region
us-west-2
for your logs. If any of these steps feel tricky or if you have questions along the way, please don’t hesitate to reach out—I’m here to help! Sources: Log collection | LiveKit Docs | aws-ecs/cloudformation.yaml | livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realti... | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWiki