9

aws cli: Invoking a Lambda and tailing the log output

 2 years ago
source link: https://www.kevinhooke.com/2021/07/18/aws-cli-invoking-a-lambda-and-tailing-the-log-output/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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.

CategoriesKev's BlogTagsaws, cloud, lambda

Leave a Reply Cancel reply

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

Comment

Name *

Email *

Website

Save my name, email, and website in this browser for the next time I comment.

Notify me of follow-up comments by email.

Notify me of new posts by email.

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

Post navigation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK