Skip to main content

Posts

Showing posts with the label shell

AWS EC2 AMI Back up Script

Goal: If you looking for an ready made working script to complete back your ec2 servers then these article is there to help you out with working shell script code. Steps: Install aws cli. (I am adding commands for Linux/macOS system, for other env please follow through link share in each steps) $ python -m pip install awscli Detailed steps for various env can be found here . To check version after installation run  $ aws --version Setup Credentials on your machine using below command and try to follow steps. $ aws configure More details can be found here .  Once Everything has been setup. you can copy code from below gist. It takes few input.  Elastic ip of server How long you want to keep your old ami Server name, that's nothing but what initial name you want to keep for your backup ami. Hope this article helped you, Lemme know if you find any difficulty using it will try to help it out ASAP.