Use case
This is a cross-post from aws-powertools/powertools-lambda-typescript#1380 opened by mikebroberts, in turn generated by this Discord discussion.
Quoting:
I typically want to always set "decrypt" to true when getting parameters (since that works just fine whether an underlying SSM param is encrypted or not, and I'm accessing infrequently enough that costs and rate limiting is not a concern), and further I'd like to have a much longer default TTL for caching parameters so that I don't have to configure on every request.
Additional context:
At the moment customers have to specify maxAge and decrypt whenever they retrieve a parameter value. Some customer, like the OP, would instead like to set these settings at the function/environment level via env variable.
The original discussion/issue was requested for the SSMProvider specifically, but I believe that maxAge could apply to other providers as well.
Solution/User Experience
Be able to set env vars for default values for the parameters module, e.g. :
POWERTOOLS_PARAMETERS_TTL = 86400 # (1 day)
POWERTOOLS_PARAMETERS_DECRYPT = True
Alternative solutions
Creating custom wrappers around methods.
Acknowledgment
Use case
This is a cross-post from aws-powertools/powertools-lambda-typescript#1380 opened by mikebroberts, in turn generated by this Discord discussion.
Quoting:
Additional context:
At the moment customers have to specify
maxAgeanddecryptwhenever they retrieve a parameter value. Some customer, like the OP, would instead like to set these settings at the function/environment level via env variable.The original discussion/issue was requested for the
SSMProviderspecifically, but I believe thatmaxAgecould apply to other providers as well.Solution/User Experience
Be able to set env vars for default values for the parameters module, e.g. :
Alternative solutions
Acknowledgment