DVA-C02 Question 262
Single answerYou are developing a serverless application using AWS Lambda and need to securely store and retrieve sensitive configuration data, such as API keys, without hardcoding them in your code. Which AWS service should you use to achieve this?
- A
Amazon S3
- B
AWS Secrets Manager
- C
AWS Key Management Service (KMS)
- D
AWS Systems Manager Parameter Store
Show answer and explanation
Correct answer: B
Explanation
AWS Secrets Manager is the best choice for securely storing and managing sensitive data, such as API keys and passwords. It provides features like automatic key rotation and fine-grained access control, which are critical for securing sensitive application configurations.
- A. Incorrect.
Amazon S3 is primarily used for storing objects such as files, images, and backups. It is not designed for securely managing sensitive configuration data like API keys.
- B. Correct.
AWS Secrets Manager is designed specifically for securely storing, rotating, and retrieving sensitive information, such as API keys, passwords, and database credentials. It is the most appropriate service for this use case.
- C. Incorrect.
AWS Key Management Service (KMS) is used for managing encryption keys. While it can be used in conjunction with other services, it is not intended to store sensitive configuration data directly.
- D. Incorrect.
AWS Systems Manager Parameter Store can store configuration data, but Secrets Manager is preferred for sensitive information due to its built-in rotation and enhanced security features.