Skip to content
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

Cannot have multiple S3 event sources on same bucket for same Lambda Function. #124

Open
olabhrad opened this issue Jun 15, 2017 · 1 comment

Comments

@olabhrad
Copy link

olabhrad commented Jun 15, 2017

The following configuration will not work:

event_sources:
- arn: arn:aws:s3:::my-bucket
events:
- s3:ObjectCreated:*
key_filters:
- type: prefix
value: my_path/
- arn: arn:aws:s3:::my-bucket
events:
- s3:ObjectCreated:*
key_filters:
- type: prefix
value: my_path2/

The problem is that Kappa is using the same notification id for both event sources.
def _make_notification_id(self, function_name): return 'Kappa-%s-notification' % function_name

This can be fixed by adding an optional "id" field for the s3 event source that can be utilised if there are more than one event sources on the same bucket e.g.

event_sources:
- arn: arn:aws:s3:::my-bucket
id: 1
events:
- s3:ObjectCreated:*
key_filters:
- type: prefix
value: my_path/
- arn: arn:aws:s3:::my-bucket
id: 2
events:
- s3:ObjectCreated:*
key_filters:
- type: prefix
value: my_path2/

olabhrad pushed a commit to olabhrad/kappa that referenced this issue Jun 15, 2017
@olabhrad
Copy link
Author

PR: #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant