
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
- Create an Amazon Machine Image (AMI) of your EC2 instance using the AWS CLI
- Create an Elastic Block Storage (EBS) Volume Snapshot using the AWS CLI (this article)
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