Skip to content

Instantly share code, notes, and snippets.

@apeckham
Last active March 8, 2016 19:08
Show Gist options
  • Save apeckham/9bcb464096997c1b0d41 to your computer and use it in GitHub Desktop.
Save apeckham/9bcb464096997c1b0d41 to your computer and use it in GitHub Desktop.
view aws lambda logs on the command line
# http://docs.aws.amazon.com/cli/latest/reference/logs/index.html
aws logs describe-log-groups
aws logs describe-log-streams --log-group-name /aws/lambda/shopify-shipping --log-stream-name-prefix 2016 >2016.json
jq -r ".logStreams[] | select(.storedBytes > 0) | \"aws logs get-log-events --output text --log-group-name /aws/lambda/shopify-shipping --log-stream-name '\(.logStreamName)'\"" 2016.json
@apeckham
Copy link
Author

apeckham commented Mar 8, 2016

https://github.com/jorgebastida/awslogs

awslogs get --start=2w /aws/lambda/shopify-shipping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment