Description
Key information
- RFC PR: (leave this empty)
- Related issue(s), if known: None
- Area: Parameters
- Meet tenets: Yes
- Approved by: ''
- Reviewed by: ''
Summary
Utilize the AWS provided AppConfig Lambda Layer. This layer is used to provide a proxy request to AppConfig configurations. The layer has built-in caching and automatically refreshes based on a TTL. This is important when utilizing the "full power" of AppConfig to more accurately provide configuration deployments to live resources as well as asses how many client-ids are covered by the deployment stages.
Layer: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-integration-lambda-extensions.html
Motivation
Preloading configurations (during cold start) automatically and utilizing AppConfig as intended - ongoing deployment of configurables. Having a background task handle resource management while persisting a client-id is very helpful and having the background task that acts as a keepalive for that client-id regardless of request requirements will assist with deployment fact gathering.
Proposal
Utilize urllib.request to read from a formated URL composed of several environment variables related to the AppConfig lambda layer. Should be a fairly straight forward update to existing appconfig code in parameters module. Some thought needs to go in to manual refresh and opting out for specific requests.
If AppConfig parameters helpers exist in the other languages powertools then it should be a fairly straight forward change.
User Experience
Enable the AWS AppConfig Lambda Layer
The only corner case for configuration would be providing sane defaults to opt-in/opt-out of using the layers HTTP endpoint rather than boto3 directly.
Drawbacks
This could muddy some thoughts on how TTLs are handled between powertools and the layer software.
No additional deps.
Rationale and alternatives
Low impact of not including this. If appconfig parameters are pulled per request the keepalive provided by the lambda layer would be redundant.
Unresolved questions
...
Metadata
Metadata
Assignees
Type
Projects
Status