-
Notifications
You must be signed in to change notification settings - Fork 421
Bug: POWERTOOLS_IDEMPOTENCY_DISABLED does not respect truthy values #4390
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Assigning to @heitorlessa |
|
This is now released under 2.39.0 version! |
Expected Behaviour
I would expect truthy values to be respected for
POWERTOOLS_IDEMPOTENCY_DISABLED
:Current Behaviour
The logic below is accessing the environment variable and bypassing the idempotency layer if it the condition evaluates to
True
. But it's always evaluating toTrue
unlessos.getenv
returnsNone
.Code snippet
Possible Solution
Leverage the
strtobool
function inaws_lambda_powertools.shared.functions
to convert the environment variable value into abool
.Steps to Reproduce
I would recommend setting the value of
POWERTOOLS_IDEMPOTENCY_DISABLED
tofalse
, which implies the user does not want idempotency to be disabled. In this situation, the Idempotency layer will be bypassed and no records will be recorded in the idempotency store.Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.11
Packaging format used
Lambda Layers
Debugging logs
No response
The text was updated successfully, but these errors were encountered: