DVA-C02 Question 224
Select 2A developer is working on a serverless application hosted on AWS Lambda. The application needs to fetch configuration data such as feature flags and database credentials securely at runtime. The developer wants to minimize code changes when updating the configuration data. Which combination of AWS services can the developer use to achieve this?
- A
AWS AppConfig for feature flags and Secrets Manager for database credentials
- B
AWS Systems Manager Parameter Store for both feature flags and database credentials
- C
Hardcode the configuration data directly in the Lambda function code
- D
Store the configuration data in an Amazon S3 bucket and fetch it during runtime
- E
AWS AppConfig for feature flags and Systems Manager Parameter Store for database credentials
Show answer and explanation
Correct answers: A, E
Explanation
To securely and dynamically access application configuration data such as feature flags and database credentials, developers can use services like AWS AppConfig, Secrets Manager, and Systems Manager Parameter Store. AWS AppConfig is tailored for managing application configuration and deploying updates without code changes. Secrets Manager and Parameter Store are excellent for securely storing sensitive information like database credentials. Hardcoding or storing configuration data in S3 lacks the security, flexibility, and versioning provided by these purpose-built services.
- A. Correct.
Correct. AWS AppConfig is specifically designed for managing and deploying application configuration data such as feature flags, while Secrets Manager is used for securely storing sensitive information like database credentials.
- B. Incorrect.
Correct. AWS Systems Manager Parameter Store supports storing both plain-text and encrypted configuration data, making it suitable for storing feature flags and database credentials.
- C. Incorrect.
Incorrect. Hardcoding configuration data in code is not a recommended practice as it is insecure and requires code changes to update the configuration.
- D. Incorrect.
Incorrect. While storing configuration data in S3 is possible, it does not provide built-in security, versioning, or runtime access capabilities that are available in services like AppConfig, Secrets Manager, or Parameter Store.
- E. Correct.
Correct. AWS AppConfig is ideal for managing feature flags, while Parameter Store can securely store database credentials.