2

I am looking to replace my lost AWS Key Pair. I have searched near and far, youtube clips, resources articles on AWS, and others. Yet I am nowhere near where I need to be.

Please can someone steer me in the proper direction? I would appreciate your assistance as I have an instance already running.

MLavoie
  • 9,671
  • 41
  • 36
  • 56
Terence - AI FX
  • 185
  • 1
  • 7
  • If the EC2 instance was correctly configured, you may be able to use a [Systems Manager Session](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-sessions-start.html#start-sys-console) to connect. And there's an additional, somewhat older option: [Connect to your Linux instance if you lose your private key](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/replacing-lost-key-pair.html). – jarmod Sep 29 '21 at 15:13

1 Answers1

2

To replace a lost key pair, you can use the AWS Systems Manager AWSSupport-ResetAccess Automation document. Or, you can create an Amazon Machine Image (AMI) of the existing instance, launch a new instance, and then select a new key pair.

https://aws.amazon.com/premiumsupport/knowledge-center/ec2-windows-replace-lost-key-pair/

Hoe to use AWSSupport-ResetAccess

This runbook will use the EC2Rescue tool on the specified EC2 instance to re-enable password decryption using the EC2 Console (Windows) or to generate and add a new SSH key pair (Linux). If you lost your key pair, this automation will create a password-enabled AMI that you can use to launch a new EC2 instance with a key pair you own (Windows).

Go through link: https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-awssupport-resetaccess.html

Deepak Gupta
  • 387
  • 2
  • 17