Bootstrap FreeKB - Amazon Web Services (AWS) - Create Amazon Machine Images (AMI) using the AWS CLI
Amazon Web Services (AWS) - Create Amazon Machine Images (AMI) using the AWS CLI


This assumes you have already configured the aws command line tool. If not, check out my article on Getting Started with the AWS CLI.

There are different ways to go about backing up your Amazon Web Services (AWS) EC2 instances

An AMI will be a complete snapshot of the entire EC2 instance, whereas an EBS Volume Snapshot will be a snapshot of one of the EBS Volumes being used by the EC2 instance

The aws ec2 create-image command can be used to create an Amazon Machine Image (AMI) of one of your EC2 instances. Be aware that by default, this will stop the EC2 instance if the EC2 instance is up and running, then create the AMI, and then start the EC2 instance.

aws ec2 create-image --instance-id i-0a3ea97aa2383de58 --name "my AMI"

 

The --no-reboot flag can be used to create the AMI snapshot without rebooting the EC2 instance.

aws ec2 create-image --instance-id i-0a3ea97aa2383de58 --name "my AMI" --no-reboot

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter b77764 in the box below so that we can be sure you are a human.