Wednesday, December 4, 2013

EC2 instance public key invalid fix

I happened to do the same thing that is listed at this web page:  http://dltj.org/article/ec2-fix-authorized_keys/

The steps are on the web page. Here are the command:
1. aws ec2 create-volume --snapshot-id snap-YourVolumesSnapshot --size 10 -- availability-zone az-asdf-1a
Note: Assumes you have a current snapshot: aws ec2 create-snapshot --volume-id vol-beforevolumewasbad
 2. aws ec2 stop-instances --instance-id i-YourInstanceId
3. aws ec2 detach-volume --volume-id vol-badvolume
4. aws ec2 attach-volume --volume-id vol-goodvolume --instance-id i- YourInstanceId --device /dev/sda1
5. aws ec2 start-instances --instance-id i-YourInstanceId



No comments:

Post a Comment