-
Notifications
You must be signed in to change notification settings - Fork 412
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
feat(event_sources): add Secrets Manager secret rotation event #3061
feat(event_sources): add Secrets Manager secret rotation event #3061
Conversation
Currently this PR only included basic Data class support, but there are some other stuff we can do to provide a better UX.
# past
metadata = service_client.describe_secret(SecretId=event['SecretId'])
# possible
metadata = event.describe_secret(client = service_client) We can also build a data class for
# past
secret = service_client.get_secret_value(SecretId=event['SecretId'], VersionId=event['ClientRequestToken'], VersionStage=stage)
# possible
secret = event.get_secret_value(client = service_client, VersionStage=stage) We can also build a data class for
|
Codecov ReportPatch coverage:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## develop #3061 +/- ##
========================================
Coverage 96.36% 96.36%
========================================
Files 184 185 +1
Lines 8050 8063 +13
Branches 1506 1509 +3
========================================
+ Hits 7757 7770 +13
Misses 236 236
Partials 57 57
☔ View full report in Codecov by Sentry. |
Hi @roger-zhangg! I like helping customers with utilities that make their lives easier. However, we already have the Parameter utility and customers can retrieve secrets/ssm/appconfig/dynamodb values using this utility. For now, we will keep this as simple as possible by providing the Data Class Event Source experience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @roger-zhangg! I made some comments to improve this PR!
You are rocking it! 🚀 🌟
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved!
Reviewing today, please update PR description UX so it's always up to date. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny changes to improve UX :-)
aws_lambda_powertools/utilities/data_classes/secrets_manager_event.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/data_classes/secrets_manager_event.py
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed!
|
Issue number: #2855
Summary
Changes
Added a new data class
SecretManagerEvent
for parsing event from Secret ManagerUser experience
before
now
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
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.