-
Notifications
You must be signed in to change notification settings - Fork 478
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
CloudWatchEvents.ScheduledEvent cannot be used with EventBridge Scheduler #1864
Comments
Since the service generating the event determines the content of this field, the Detail class is correctly modeled as class without fields.
|
Is there any information why string |
Reproducible using payload provided by customer. Unsure why in AWS service event metadata, for detail, is states Just FYI, Java Lambda event POCO class ScheduledEvent represents @Dreamescaper In your use case, are you actually receiving Thanks, |
@ashishdhingra |
@ashishdhingra |
@Dreamescaper Thanks for sharing the information. I have opened ticket with Lambda team. Internal Ticket: P170893989 |
Thanks, |
Describe the bug
Attempting to use ScheduledEvent with EventBridge Scheduler fails due to JSON Serialization.
Regression Issue
Expected Behavior
I am able to use ScheduledEvent with EventBridge Scheduler.
Current Behavior
Error converting the Lambda event JSON payload to type Amazon.Lambda.CloudWatchEvents.ScheduledEvents.ScheduledEvent: The JSON value could not be converted to Amazon.Lambda.CloudWatchEvents.ScheduledEvents.Detail. Path: $.detail | LineNumber: 0 | BytePositionInLine: 339.
Additional Information/Context
Here's the event I'm receiving:
It is very-very similar to what we have in ScheduledEvent. However, "detail" here is a string, not a json object.
According to
https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events-structure.html
"detail" should be a JSON object, but "{}". I have no idea why such string is allowed, or whether any other stringified JSON is possible there.
Possible Solution
Write JSON converter, which allows Detail to be string (either allow empty object string only "{}", or a full stringified JSON object - not sure).
AWS .NET SDK and/or Package version used
Amazon.Lambda.CloudWatchEvents 4.4.0
Targeted .NET Platform
.NET 8
Operating System and version
AmazonLinux
The text was updated successfully, but these errors were encountered: