AWS Certified Solutions Architect – Professional (SAP-C02) — Question 313

A research company is running daily simulations in the AWS Cloud to meet high demand. The simulations run on several hundred Amazon EC2 instances that are based on Amazon Linux 2. Occasionally, a simulation gets stuck and requires a cloud operations engineer to solve the problem by connecting to an EC2 instance through SSH.

Company policy states that no EC2 instance can use the same SSH key and that all connections must be logged in AWS CloudTrail.

How can a solutions architect meet these requirements?

Answer options

Correct answer: C

Explanation

EC2 Instance Connect allows secure connection to instances without the need to manage and share static SSH keys, as it generates and pushes a one-time-use public key to the instance metadata. Because EC2 Instance Connect relies on IAM policies, the SendSSHPublicKey API call is automatically logged in AWS CloudTrail, satisfying the auditing requirement. Other options involving manual key management or custom rotation scripts are complex, less secure, and do not natively leverage CloudTrail for SSH access auditing.