-
Notifications
You must be signed in to change notification settings - Fork 671
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
Handling custom EventBridge events #675
Comments
Hey @martoncsikos , if you remove that one line will the rest of the selection criteria work for your event? If so, I'm happy to merge a PR removing that line. If not, we may need to consider a new event like |
Hey @brettstack, yes I have tested this in our environment and removing that one line works perfectly fine. I created the PR, just removing the line seems lower impact, so I went with that. |
Thanks @martoncsikos ! I appreciate the contribution. |
No problem, thanks for the quick resolution! |
Hello,
My handler setup:
Event I'm sending via Eventbridge from one of my services:
I'm getting the following error:
Error: Unable to determine event source based on event.
I believe the root cause is this:
serverless-express/src/event-sources/utils.js
Line 115 in 1376bd0
The event with source
mycustomservice
is not accepted, because the event source does not start withaws.
The
aws.
prefix is reserved for events originating from AWS owned services, it's not allowed for custom events.Per AWS docs the Minimum information needed for a valid custom event is only this much:
Is it necessary to check the
.aws
prefix in the source?Would it be possible to just check the existence of the minimally required keys in the event and accept them as EventBridge events if they do? That would make it possible to handle customer owned events.
Until then, is it possible to work around this with a custom request mapper?
Awesome library btw, thanks for the great work! Happy to create a PR if needed.
The text was updated successfully, but these errors were encountered: