Skip to content

EventBridgeEventObj.detail expects a string instead of an object #752

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

Closed
nicolai0 opened this issue Dec 13, 2023 · 3 comments · Fixed by #755
Closed

EventBridgeEventObj.detail expects a string instead of an object #752

nicolai0 opened this issue Dec 13, 2023 · 3 comments · Fixed by #755

Comments

@nicolai0
Copy link

nicolai0 commented Dec 13, 2023

EventBridgeEventObj expects a JSON string in the detail field always as discussed and implemented in #704. I don't know if it's possible for it to actually be a string, but it can definitely be an object. See an example here: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html.

This makes the types here currently unusable for the most common pattern which is when creating a Lambda that processes EventBridge events from AWS services, like ECS.

@nicolai0 nicolai0 changed the title EventBridgeEventObj expects a string Instead of an object EventBridgeEventObj.detail expects a string instead of an object Dec 13, 2023
@calavera
Copy link
Contributor

how can we improve this? do you want to open a PR?

@nicolai0
Copy link
Author

I think we just need to remove this line, but I'm not super experienced with library development and bounds and stuff:

#[serde_as(as = "serde_with::json::JsonString")]

Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for the maintainers of this repository to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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

Successfully merging a pull request may close this issue.

2 participants