Question #970
A developer is using multiple AWS Lambda functions that require access to dynamic configuration data stored as an 8 KB JSON file in AWS AppConfig. The configuration must be updated frequently without requiring redeployment of the Lambda functions. The developer needs a solution that minimizes development effort while ensuring the Lambda functions can retrieve the latest configuration data at runtime.
What should the developer do to meet these requirements?
Migrate the JSON file from AWS AppConfig to AWS Systems Manager Parameter Store. Retrieve the parameter value at runtime using the AWS SDK.
Configure the AWS AppConfig Lambda extension. Access the configuration data by querying the extension via a local HTTP endpoint.
Use the AWS SDK to directly call AWS AppConfig APIs within the Lambda functions. Cache the configuration data to reduce API calls.
Embed the configuration file in the Lambda layer. Read the file from the layer's file system during execution.
Explanation
Answer B is correct because the AWS AppConfig Lambda extension simplifies configuration retrieval by running alongside the Lambda function. The extension handles caching, polling for updates, and exposing the latest configuration via a local HTTP endpoint. This approach eliminates the need to modify Lambda code to call AppConfig APIs directly (as in Option C) or manage caching logic manually. Option A (Parameter Store) lacks AppConfig's dynamic configuration features like validation and deployment strategies. Option D (Lambda layer) requires redeployment for updates, violating the requirement. Key points: AppConfig extensions reduce code changes, ensure real-time updates, and avoid redeployment.
Answer
The correct answer is: B