Working with AWS Cloud from CommandLine — Part4

In this article, we will understand how to create Snapshots in aws cloud using aws cli.

Snapshots:

Step 1: Detaching the volume from the instance.

Command: sudo umount <partition_name>
Command: aws ec2 detach-volume   --volume-id=<> --instance-id=<>  
--region=ap-southeast-1

Step 2: Creating the snapshot from the detached volume.

Command: aws ec2 create-snapshot   --volume-id=<>                                         --description="any_description"    --region=ap-southeast-1
Command: aws ec2 copy-snapshot source-snapshot-id=<>            
--source-region=<> --destination-region=<>
Command: aws ec2 attach-volume --volume-id=<> --instance-id=<> 
--device=/dev/sdf

And thats it. Done!

📝 ️Few Last Words

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store