-
-
Save progvp/599a812500afcffbff5c2b82b2233e07 to your computer and use it in GitHub Desktop.
Debugging AWS Lambda Python scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
logger.info('Event: %s' % json.dumps(event, indent=2)) | |
See https://gist.github.com/gene1wood/24e431859c7590c8c834 | |
time aws lambda invoke --invocation-type RequestResponse --function-name reportUntaggedInstances --region us-west-2 --log-type Tail --payload '{"region": "us-west-2"}' lambda.log | |
awslogs groups | |
awslogs get /aws/lambda/reportUntaggedInstances --no-group --no-stream -s '15 min ago' | |
aws ec2 describe-instances --filters "Name=instance-state-name,Values=running" | grep -i Name | |
More info http://engineering.pivotal.io/post/running-tests-in-aws-lambda/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment