

At the end of this process you should have three Lambda Functions. Your Tag name and values can be what ever you want them to be.Ĭreate Amazon Lambda functions for each files.
#Ebs yazılım full code#
In my code I added the Tag "Snaplifetime" and a Value of "2" or "4" to my EC2 instances. The lifetime is stored in the value of the Tag you created for this reason. Lastly, Your Snapshots will be deleted after the number of days you specified for them to live has expired.
#Ebs yazılım full update#
Update the Status field of the DynamoDB Table with the new status, for example from Pending to Completedĭ. The meta-data for each snapshot is stored in a DynamoDB Table (caled 'Snaps').Ĭ. Please note that I used the Tag "snapshot" in the snapshot creation script but you can change this what you like.ī. Snapshots are then created of the Non Root EBS volumes that are attached to this Instance.

This is a accomplish by looking for EC2 Instances that has a certain Tag assigned to them, for example 'snapshot'. Create Snapshots of your EBS volumes that are attached to your EC2 Instances. When used together, these functions will :Ī. This solution uses Amazon Lambda, EC2, CloudWatch Events, DynamoDB and EC2 Run Command(bonus script). They should not be used in production without modification. These scripts should be used as guidance for creating a complete EBS Life Cycle Management solution for your production environments. Complete EBS Life Cycle Management, from creating and deleting Snapshots.
