aws cli: Invoking a Lambda and tailing the log output

If you invoke a Lambda and include the —log-type Tail param, you’ll get a bunch of encoded output like:

    "StatusCode": 200,
    "LogResult": "MDIxLTA3LTE4IDAzOjAzOjU...

To decode it to readable output, you need to pipe it into a base64 util to decode, like:

aws lambda invoke local --region us-west-1 --function-name your-function-name --log-type Tail | base64 -d

This is covered in the docs here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.