AWS Certified Security – Specialty (SCS-C02) — Question 78

A company's policy requires that all API keys be encrypted and stored separately from source code in a centralized security account. This security account is managed by the company's security team. However, an audit revealed that an API key is stored with the source code of an AWS Lambda function in an AWS CodeCommit repository in the DevOps account.

How should the security team securely store the API key?

Answer options

Correct answer: C

Explanation

The correct answer is C because AWS Secrets Manager is specifically designed for securely storing sensitive information like API keys, and it allows for easy access management through IAM roles. Option A, while secure, requires unnecessary migration of code and does not directly address the key storage issue. Option B introduces complexity with presigned URLs and S3, which isn't as secure or straightforward as using Secrets Manager. Option D suggests using an environment variable, which can expose the key if not handled correctly, making it less secure than storing it in Secrets Manager.