Security

A pipeline uses the Amazon EC2 CreateKeyPair API to generate development SSH keys and retains only the returned key pair ID. Developers need the private key later, but pipeline logs must not contain it. What should the developer change?

Show the answer

Correct answerC. Capture KeyMaterial and securely store it in AWS Secrets Manager.

AWhy not this: A fingerprint identifies a key; it cannot reconstruct its private material.

BWhy not this: DescribeKeyPairs returns key pair metadata, not the private key generated during creation.

CWhy this is right: Capturing KeyMaterial at creation preserves the private key without placing it in pipeline logs.

DWhy not this: EBS encryption protects volume data; it does not preserve the private key returned by CreateKeyPair.

CreateKeyPair returns the private key in KeyMaterial only when the key pair is created, so the pipeline must securely capture it then. DescribeKeyPairs returns metadata, not a recoverable copy of the private key.