DVA-C02 Question 206
Single answerYou are developing a serverless application on AWS that uses an AWS Lambda function to connect to a MySQL database hosted on Amazon RDS. The database credentials need to be securely stored and rotated automatically. Which service would you use to meet these requirements?
- A
AWS Secrets Manager
- B
AWS Systems Manager Parameter Store
- C
Amazon RDS Automatic Backups
- D
AWS Key Management Service (KMS)
Show answer and explanation
Correct answer: A
Explanation
AWS Secrets Manager is the best option for this scenario as it provides secure storage for database credentials and supports automatic rotation of secrets. This ensures that your application can securely access the database without manual updates to credentials. AWS Systems Manager Parameter Store can store sensitive data but lacks native automatic rotation, which makes it less suited for this specific requirement. The other options, Amazon RDS Automatic Backups and AWS KMS, are not relevant to secrets management.
- A. Correct.
AWS Secrets Manager is specifically designed for secure storage, automatic rotation, and retrieval of secrets such as database credentials. It is the ideal choice for this use case.
- B. Incorrect.
While AWS Systems Manager Parameter Store can store sensitive information securely, it does not natively support automatic rotation of secrets, which is a key requirement in this case.
- C. Incorrect.
Amazon RDS Automatic Backups is a feature for creating automated backups of your database, but it does not handle secrets management or credential storage.
- D. Incorrect.
AWS Key Management Service (KMS) is used for managing and encrypting keys, but it is not used for storing or rotating database credentials.