Accessing Lambda function logs

I have a bucket created in us-west-2 along with a lambda function in us-west-2 and an S3 event trigger for s3:PutObject . I then use a signed URL to upload a file into the bucket. Using the AWS CLI with --region us-west-2 and --endpoint-url= http://localhost:4566 reveals the bucket and objects do indeed exist in us-west-2 . The lambda function is getting invoked in us-west-2 as well, as per the output logs of the localstack-pro container (with DEBUG=1 ). I am using the latest LocalStack Pro Docker image.

The logs for the lambda function (print in the Python) can only be viewed using docker logs on the underlying Lambda executor Docker. When LocalStack Pro is run with DEBUG=1 the log output printed is empty, although LocalStack’s logs do say the function was invoked (and the stdout from the function can indeed be seen via the Docker logs output). Additionally, the CloudWatch logs (aws logs ) have no events, despite the log group and stream existing in us-west-2 .

Hi @platobms,

I am going to do my best to answer your question.

Please have a look at our documentation on Lambda | Docs (localstack.cloud).
Alternatively, you can use our website application, where you can easily access CloudWatch logs.
If you want LocalStack to log more information, you can also set the variable LS_LOG=trace.

1 Like