Question 254:
You launched an EC2 instance a month ago using your own laptop. On the instance, you have deployed an application that you are currently working on. The laptop has a hardware issue today, and you cannot power it up. You are trying to use another computer to continue working on the application. But you cannot SSH to the instance as the SSH pem file is stored only in the old laptop. Which of the following options can help you to address the problem?
Answer options:
A.Stop the instance and add a command to delete the authorized_keys file in the instance user data. Start the instance and then SSH to the instance using another key. B.Use AWS CLI "aws ec2 import-key-pair" to replace the SSH key pair of the EC2 instance. Use the new private key to SSH to the instance. C.There is no way to SSH to the instance if the key is lost. Use a CI/CD pipeline to create a new instance with a new key. D.Create an image of the EC2 instance, launch a new instance with the AMI and select a different SSH key. Use the key to SSH to the instance.