-
Notifications
You must be signed in to change notification settings - Fork 1
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
[ETL-628] Rework S3 event config lambda #108
Conversation
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.
LGTM!
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.
Just a few small comments! Otherwise LGTM!
There is a bug in moto/AWS where moto only allows filter rules with lowercase `Name` values in put_bucket_notification_configuration calls. So to normalize our notification configurations when comparing configurations obtained via a GET with configurations to be utilized in a PUT (as we do in the function `notification_configuration_matches`), we make the `Name` values lower case in when comparing notification configurations. When calling get_bucket_notification_configuration, the `Name` value is always capitalized, whereas moto requires us to use lowercase `Name` values when calling put_bucket_notification_configuration.
Quality Gate passedIssues Measures |
Significant changes in the S3 event config lambda to support indexing individual configurations based on their S3 prefix/suffix overlap.
.github/workflows/upload-and-deploy-to-prod-main.yaml
and.github/workflows/upload-and-deploy.yaml
src/lambda_function/s3_event_config/app.py
NotificationConfiguration
: creates a common interface for interacting with individual notification configurations.NotificationConfigurationType
: subsets the Enum class to restrict the types allowed for aNotificationConfiguration
toQueue
,Topic
, andLambdaFunction
.BucketNotificationConfigurations
: A convenience class which wraps a collection ofNotificationConfiguration
objects and provides a method for converting them back into a dict representation which can be used withput_bucket_notification_configuration
.add_notification
is now more strict. Notification configurations can be added, but not updated. See the docstring for more details.delete_notification
now uses the prefix filter rules to identify which notification needs deletion.