Create EC2 Ami using bash script with No Reboot
Some we need to automate things based on our requirements, here is a simple script you can set as a cronjob to take your ec2 ami,Normally ec2 requires a reboot while taking ami’s/images. Here we can take ami without rebooting the ec2 instance using –no-reboot flag.
Create ec2 ami using bash script with no reboot
Step1. Create file /root/backup_ami.sh
Step2. You need access key & secret key , if you forgot your existing account’s access key & secret key,don’t worry, just create a IAM user with administrator privilege.
To create IAM user refer
Step3. Once you got secret key & access key,then put the below script.
That’s all … done 🙂