Skip to content

Create AMI of Ec2 instances and delete the AMI after certain period with AWS Lambda🙂.

Notifications You must be signed in to change notification settings

nikunjdnp/serverless-ami-creation-deletion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

serverless-ami-creation-deletion

Whenever the lambda function will be triggered, it will create AMI of your ec2 instances and delete the instances whose expiry date is less than the current date.

Configuration

For configuration, the following variables need to be configured in the index.js file,


# specify the region name where you have your ec2 workloads.
region = 'us-east-1'

TagName = 'BackupNode'
SENDER_EMAIL_ID = 'abc@gmail.com'
CC_EMAIL_IDS = 'xyz@gmail.com'
TO_EMAIL_IDS = 'abc123@gmail.com'
RETENTION_TYPE = 'minutes'
RETENTION_TIME = 10

For more information, please review my blog (http://bit.ly/2Nd5iq6).

About

Create AMI of Ec2 instances and delete the AMI after certain period with AWS Lambda🙂.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published