# If you lost the Ec2 key pair. How to recover it ?

# If you lost the Ec2 key pair. How to recover it ?

  • First go to your EC2 instance,Right click on instance and click on image and go with create image
  • Give image name and description and click on create image
  • Now image is created and wait for few minutes and under image you will get AMI option
  • Now status Changes from pending to available
  • Now click on instances uncheck your last created instance and click on launch instance
  • Go to My Ami and select the image you created
  • choose instance type
  • configure instance details
  • Add storage
  • Add tags
  • Configure Security Groups
  • Select key pair in that Create a New keypair and click on launch instanceNow click on Ec2 and delete the last instance
  • Now you can log in to new instance using the newly created PEM key

Community and Social Footprints :