How to retrieve an EC2 Instance with a lost pem file that also have a Self-Managed MongoDB

0

I have an ec2 instance where I installed a managed mongodb instance with millions of records. Overtime, I misplaced the pem file. I am looking for a way to retrieve the pem file or how to migrate the mongodb database on the instance to another self managed mongodb instance on ec2.

2개 답변
1

Steps for connecting to an EBS-backed instance with a different key pair

Step 1: Create a new key pair
Step 2: Get information about the original instance and its root volume
Step 3: Stop the original instance
Step 4: Launch a temporary instance
Step 5: Detach the root volume from the original instance and attach it to the temporary instance
Step 6: Add the new public key to authorized_keys on the original volume mounted to the temporary instance
Step 7: Unmount and detach the original volume from the temporary instance, and reattach it to the original instance
Step 8: Connect to the original instance using the new key pair
Step 9: Clean up

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#replacing-lost-key-pair

답변함 일 년 전
0

Other solution could be to start using the Systems Manager Session Manager to connect to your instance: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/session-manager.html

profile picture
sazecis
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠