AWS Certified Developer – Associate (DVA-C02) — Question 408
A developer built an application by using multiple AWS Lambda functions. The Lambda functions must access dynamic configuration data at runtime. The data is maintained as a 6 KB JSON document in AWS AppConfig. The configuration data needs to be updated without requiring the redeployment of the application.
The developer needs a solution that will give the Lambda functions access to the dynamic configuration data.
What should the developer do to meet these requirements with the LEAST development effort?
Answer options
- A. Migrate the document from AWS AppConfig to a Lambda environment variable. Read the document at the runtime.
- B. Configure the AWS AppConfig Agent Lambda extension. Access the dynamic configuration data by calling the extension on a local host.
- C. Use the AWS X-Ray SDK to call the AWS AppConfig APIs. Retrieve the configuration file at runtime.
- D. Migrate the configuration file to a Lambda deployment package. Read the file from the file system at runtime.
Correct answer: B
Explanation
Using the AWS AppConfig Agent Lambda extension is the most efficient solution because it automatically handles fetching, caching, and updating the configuration locally, allowing the Lambda function to access it via a simple localhost call with minimal code. Environment variables are limited to 4 KB and require updates to the function configuration, while embedding the file in the deployment package requires a redeployment to update the data. The AWS X-Ray SDK is designed for tracing and profiling, not for retrieving configuration data.