Skip to content

Lambda function to capture EC2 console screenshots and save it in an S3 bucket every 15 minutes

Notifications You must be signed in to change notification settings

yasithab/lambda-capture-ec2-console-screenshots

Repository files navigation

Lambda function to capture EC2 console screenshots and save it in an S3 bucket every 15 minutes.

Configure triggers using CloudWatch events

  • Schedule expression: rate(15 minutes)
  • Enabled

Programming language

  • Python 3.7

Environment variables

KEY VALUE
S3_BUCKET_NAME console-screenshots
EC2_TAG_KEY screenshot
EC2_TAG_VALUE true

Create a Lambda service role

Role Name: capture-ec2-console-screenshots

Use capture-ec2-console-screenshots.json policy document to allow lambda function to capture and save screenshots in a S3 bucket.

Lambda Service Role

Set Timeout

Set the Timeout to 30 seconds. This value might need to be changed according to your requirnments.

Room for improvements

If you think you can further improve this function, feel free to send a PR.

References

About

Lambda function to capture EC2 console screenshots and save it in an S3 bucket every 15 minutes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages