# # 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 :

- [Mounika Kanda](https://www.linkedin.com/in/mounistack/)
- [GitHub](https://github.com/cloudnloud)
- [Twitter](https://twitter.com/cloudnloud)
- [YouTube Cloud DevOps Free Trainings](https://www.youtube.com/c/CloudnLoud?sub_confirmation=1)
- [Linkedin Page](https://www.linkedin.com/company/80359681/)
- [Linkedin Group](https://www.linkedin.com/groups/9124202/)
- [Discord Channel](https://discord.gg/vbjRQGVhuF)
- [Dev](https://dev.to/cloudnloud)
