-
Notifications
You must be signed in to change notification settings - Fork 13
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
Structures for not-just-lambda events? #137
Comments
I agree that separating the two is probably a good idea. The recent move of the Aeson parser was quite a pain for compatibility, so my lean is either to do this soon, or just commit to this being the long term place for events. I think that's likely not a good idea because I just generally expect that to be a bit more volatile. So, I think now is probably the best time if more schemas (events or destinations) are of interest. Based on the Aeson changes, I think flags are the way to go. It looks like we can add a flag to Hal that keeps event modules out so that they don't collide with the new package. It would default to the existing behavior today, and then maybe eventually we just no longer export them at all in future major version bump. |
I'm not sure we need to do too much with flags to ensure a smooth experience for users. What made things hard in the What I propose we do:
I think this means packages can move across to |
At work, we're considering using Lambda Destinations to respond to failed asynchronous lambda invocations. The obvious thing to do would be to PR some new types and
ToJSON
/FromJSON
instances for that type, but they're not really lambda-specific: they can also be sent to SQS Queues, SNS Topics, or onto an EventBridge Event Bus. So there's a decent case for putting it in some other packageThat got me thinking: should we look at separating
hal
from the event types? A package name likeaws-lambda-events
sounds like a fine home for events sent to Lambda Functions (e.g., things that come from an Event Source Mapping) as well as events generated by Lambda Functions (e.g., invocation records sent to a Lambda Destination, regardless of type). And the package would only really need to depend onaeson
and testing libraries.I'm interested to hear what you think here, and what namespace we could use to ensure a smooth transition. I expect we'd want to do something clever with re-exports or something so that existing code can keep working with warnings, and then migrate to using the new package as a direct dependency.
The text was updated successfully, but these errors were encountered: