How To Find the AWS Region and Availability Zone Via the CLI

Author: , June 30th, 2015

/opt/aws/bin/ec2-metadata | grep placement

How To Fix Broken Boot After Yum Update On Amazon Linux

Author: , January 20th, 2012

Stop the instance first…YMMV: 1 2 3 4 5 yourHost# ec2-describe-images describe-images -o amazon –filter "manifest-location=*pv-grub-hd0_1.02-i386*" –region us-east-1 IMAGE   aki-805ea7e9    ec2-public-images/pv-grub-hd0_1.02-i386.gz.manifest.xml amazon  available   public      i386    kernel              instance-store  paravirtual xen   yourHost# ec2-modify-instance-attribute –kernel aki-805ea7e9 –region us-east-1 i-39764XXX kernel  i-39764XXX  aki-805ea7e9 yourHost# ec2-describe-images describe-images […]

Automating Amazon EC2 Instance Backup and Recovery

Author: , November 8th, 2011

My second article has just been published on CloudSpring.com! This is very exciting for me, and there are going to be more on the way.

How To Create A New AWS Instance From A Snapshot

Author: , August 16th, 2011

Be sure to create regular snapshots of your running instances. If you lose an instance, recover quickly with this procedure. I suggest that you use Elastic IP addresses to make the migration DNS-free. STEP 1: First, setup your environment properly 1 2 3 4 5 6 export EC2_HOME=’/opt/aws/apitools/ec2′  # Make sure you use the API […]

How To Get root Access To An AWS Instance At Launch

Author: , August 3rd, 2011

First use SSH to login as the ec2-user: 1 2 3 ssh -i AWSKeyPair.pem ec2-user@{NewHostName} % sudo su – # ssh -i AWSKeyPair.pem ec2-user@{NewHostName} % sudo su – # erics@zeus:/Users/erics # ssh -i foo.pem ec2-user@thehost.foo Last login: Tue Nov 19 20:28:19 2013 from foo.bar __| __|_ ) _| ( / Amazon Linux AMI ___|\___|___| https://aws.amazon.com/amazon-linux-ami/2013.09-release-notes/ […]