Home > Amazon EC2 > Useful Commands

List out the region names

ec2-describe-regions

Display Instance Information

ec2-describe-instances --region ap-southeast-1 <instance-id>

Check deleteOnTermination Flag of an Instance

ec2-describe-instance-attribute --region ap-southeast-1 <instance-id> -b -v

Turn Off deleteOnTermination Flag

ec2-modify-instance-attribute --region ap-southeast-1 <instance-id> --block-device-mapping "/dev/sda1=::false"

Reference: http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/OperationList-cmd.html



Flag Counter