The easiest way is: 1) Create image of original image. 2) Launch new EC2 instance using AMI image (from step 1) with new key pair. 3) Login new EC2 instance with new key. Cheers!
Thanks man for the video. Even if it's old, but it helped me to use with another (in may case: existing) .pem file as key pair. Just few notes for watchers: 1. on 8:40 sure don't need to use the default "/dev/sdf". But "/dev/xvda" also didn't helped me, because after attaching that volume to the original (prod) instance, I've got an error when I want to start the instance. So instead I've used "/dev/sda1". I've found about that here: stackoverflow.com/a/45157742 But if you getting an error, don't be disappointed, check another versions of answers. The reason may be the difference of available zones. 2. Also after successfully starting the instance, and checking the SSH connection, you can easily terminate/delete the temporary (recovery) instance. So it not need anymore 3. Later for original instance, when you hit the "Connect" button, it will open a modal, which where mentioned about old key pair. Don't worry, that's normal. So remember to use the newly recovered .pem file for SSH connections.
mount: /mnt/new: wrong fs type, bad option, bad superblock on /dev/xvdf1, missing codepage or helper program, or other error. i am not able to mount the volume
an error:Adter attached root volume to original server then starting instance ,i am facing " Instance reachability check failed". Please help me, i did restart the instance
The original instance's device is "/dev/sdf1". How to handle it? Invalid value 'i-03d021052a9c26745' for instanceId. Instance does not have a volume attached at root (/dev/sda1) And then, when I set the device in /dev/sda1 , I cannot connect to the instance Show "ssh: connect to host xx.xx.xxx.xx port 22: Operation timed out"
Hi there everyone I have a little problem, I have lost a key pairs of one of my instances, so when recovering the instance I have to stop the instance I have lost the key for, so will I loose data from that instance???
while iam attaching the /dev/xvda to old instance it showing error "Invalid value 'i-0f04c8f3ae12275e5' for instanceId. Instance does not have a volume attached at root (/dev/sda1)".please help me
is there different directory for key in ubuntu? Since i followed same step but i am still not able to access with new key, i think i didn't key was not copied correctly. Please help anyone for ubuntu linux. Thanks in advance!