Uh oh!
There was an error while loading. Please reload this page.
Implemented ConfigureBucketNotifications class - #242
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new CloudFormation custom resource implementation (Custom::ConfigureBucketNotifications) to manage S3 bucket event notifications and SNS topics/subscriptions for multiple “sources”, grouping by bucket so a single SNS topic is shared per bucket.
Changes:
- Introduces
ConfigureBucketNotificationsresource to create/update/delete SNS topics + topic policies per bucket. - Configures S3 bucket notification
TopicConfigurationsfors3:ObjectCreated:Putevents. - Creates HTTPS SNS subscriptions per bucket for each configured Sumo endpoint and performs cleanup on update/delete.
Suppressed comments (1)
sumologic-app-utils/src/awsresource.py:1547
_cleanuphas the same issue as_configure: it indexessrc['SumoEndpoint']without checking it exists and can duplicate endpoints while grouping. This can raiseKeyErrorduring delete/update flows and makes the grouping inconsistent with_configure.
active = [s for s in sources if s.get('BucketName')]
buckets = {}
for src in active:
buckets.setdefault(src['BucketName'], []).append(src['SumoEndpoint'])
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ConfigureBucketNotifications ?
For each unique bucket in the Sources list:
subscriptions — one to the ALB Sumo source endpoint, one to the ELB Sumo source endpoint. Both get every S3 event.