Skip to content

Feature request: ability to set maxAge and decrypt via environment variables for Parameters #1380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 tasks done
mikebroberts opened this issue Mar 23, 2023 · 5 comments · Fixed by #1384
Closed
2 tasks done
Assignees
Labels
completed This item is complete and has been merged/shipped feature-request This item refers to a feature request for an existing or new utility parameters This item relates to the Parameters Utility

Comments

@mikebroberts
Copy link

Use case

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.

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

(see also discussion in Discord at https://discordapp.com/channels/1006478942305263677/1088151329538580631/1088483265003925564)

Alternative solutions

No response

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

@mikebroberts mikebroberts added triage This item has not been triaged by a maintainer, please wait feature-request This item refers to a feature request for an existing or new utility labels Mar 23, 2023
@dreamorosi dreamorosi changed the title Be able to set global defaults for Parameter access with environment variables Feature request: ability to set maxAge and decrypt via environment variables for Parameters Mar 23, 2023
@dreamorosi dreamorosi added discussing The issue needs to be discussed, elaborated, or refined parameters This item relates to the Parameters Utility and removed triage This item has not been triaged by a maintainer, please wait labels Mar 23, 2023
@dreamorosi dreamorosi moved this from Backlog to Ideas in AWS Lambda Powertools for TypeScript Mar 23, 2023
@dreamorosi
Copy link
Contributor

Hi @mikebroberts, thank you for taking the time to open this feature request after our discussion on Discord.

Generally speaking I think this should be feasible and that it's a good feature to add. Before confirming and adding it to the backlog please allow me some time to look at the codebase and I'll get back to you here.

If confirmed, we'll have the feature in one of the next versions and before GA release.

@dreamorosi
Copy link
Contributor

cc @heitorlessa, @jeromevdl - you might want to consider this feature too (omitting .NET for now since they don't have the utility yet).

@heitorlessa
Copy link
Contributor

Leave with us! @rubenfonseca @leandrodamascena If I don't create an issue in the Python repo, please do - let's implement this, should be quite fast to do it.

@dreamorosi dreamorosi self-assigned this Mar 27, 2023
@dreamorosi dreamorosi moved this from Ideas to Backlog in AWS Lambda Powertools for TypeScript Mar 27, 2023
@dreamorosi dreamorosi added this to the Parameters - GA Release milestone Mar 27, 2023
@dreamorosi dreamorosi moved this from Backlog to Working on it in AWS Lambda Powertools for TypeScript Mar 28, 2023
@dreamorosi dreamorosi added completed This item is complete and has been merged/shipped confirmed The scope is clear, ready for implementation and removed discussing The issue needs to be discussed, elaborated, or refined completed This item is complete and has been merged/shipped labels Mar 28, 2023
@dreamorosi
Copy link
Contributor

Just to follow up on this: I have opened a PR with the new env variables. They should be available in the next beta release or the one right after.

@github-project-automation github-project-automation bot moved this from Working on it to Coming soon in AWS Lambda Powertools for TypeScript Mar 29, 2023
@github-actions
Copy link
Contributor

⚠️ COMMENT VISIBILITY WARNING ⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@github-actions github-actions bot added the pending-release This item has been merged and will be released soon label Mar 29, 2023
@dreamorosi dreamorosi removed the confirmed The scope is clear, ready for implementation label Mar 29, 2023
@dreamorosi dreamorosi moved this from Coming soon to Shipped in AWS Lambda Powertools for TypeScript Apr 11, 2023
@dreamorosi dreamorosi added completed This item is complete and has been merged/shipped and removed pending-release This item has been merged and will be released soon labels Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed This item is complete and has been merged/shipped feature-request This item refers to a feature request for an existing or new utility parameters This item relates to the Parameters Utility
Projects
None yet
3 participants