Fork me on GitHub
#aws
<
2020-04-11
>
iwajaki199422003:04:14

I have some urgent problem I created new instance (ubuntu ) on AWS ec2 and I forgot the .pem file is there any way to access on this current instance?

hiredman04:04:10

"Amazon EC2 doesn't keep a copy of your private key; therefore, if you lose a private key, there is no way to recover it." https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html

include09:04:04

^ 1) stop instance, create a snapshot, from snapshot create a volume. 2) create new key, create new instance with that key, attach and mount new volume using the volume created above.