-
Notifications
You must be signed in to change notification settings - Fork 171
refactor: idempotency env service to functions 4246 #4314
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
refactor: idempotency env service to functions 4246 #4314
Conversation
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
@dreamorosi Thanks for the clear scope and guidance, let me know how I did when you get a chance. |
|
Thank you for the contribution, merging now! |
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
@aws-powertools/lambda-typescript No related issues found. Please ensure 'pending-release' label is applied before releasing. |
Summary
This PR refactors the Idempotency utility to replace the
EnvironmentVariablesService
class-based approach with functional helper utilities from the commons package. The changes eliminate class inheritance and instantiation in favor of direct function calls, improving performance, reducing bundle size, and increasing consistency across the Powertools codebase.Changes
EnvironmentVariablesService
instantiation with directgetBooleanFromEnv()
call forPOWERTOOLS_IDEMPOTENCY_DISABLED
environment variableEnvironmentVariablesService
usage with directgetStringFromEnv()
call forAWS_LAMBDA_FUNCTION_NAME
environment variable#
private field syntaxEnvironmentVariablesService.ts
and associated test filesRelated Work: This continues the architectural modernization started in #4251 (Logger utility), applying the same functional pattern to the Idempotency utility as part of the broader initiative to eliminate class-based environment services across all Powertools packages.
Issue number: closes #4246 & #4247
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.