CloudWatchEvents.ScheduledEvent cannot be used with EventBridge Scheduler
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start with Amazon.Lambda.CloudWatchEvents.ScheduledEvent and its Detail deserialization in version 4.4.0, then compare it with the supplied EventBridge Scheduler payload. Determine the supported string form for detail and verify that the Scheduler event converts successfully on .NET 8 without breaking normal event-object deserialization.
Written by the indexing model from the issue text.
Description
Describe the bug
Attempting to use ScheduledEvent with EventBridge Scheduler fails due to JSON Serialization.
Regression Issue
- Select this option if this issue appears to be a regression.
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:
{
"version": "0",
"id": "49672d39-8c3a-4cc6-8de5-c57b0acf718f",
"detail-type": "Scheduled Event",
"source": "aws.scheduler",
"account": "12345",
"time": "2024-11-07T22:05:00Z",
"region": "eu-central-1",
"resources": [
"arn:aws:scheduler:eu-central-1:12345:schedule/default/test-schedule"
],
"detail": "{}"
}
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
- Dominant language
- C#
- Stars
- 1.7k
- Forks
- 503
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 14
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/aws-lambda-dotnet
-
bug p2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
aws/aws-lambda-dotnet#2571 · 1 comment ·
Maintainers usually reply within 1 day
-
bug module/aspnetcore-support p2 queued
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aws/aws-lambda-dotnet#1123 · 4 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
feature-request p2
Difficulty 4/5 3-5 days Newbie friendliness 68/100
aws/aws-lambda-dotnet#2583 ·
Maintainers usually reply within 1 day
-
feature-request p2
Difficulty 4/5 3-5 days Newbie friendliness 68/100
aws/aws-lambda-dotnet#2572 · 1 comment ·
Maintainers usually reply within 1 day
-
feature-request p2
Difficulty 4/5 3-5 days Newbie friendliness 48/100
aws/aws-lambda-dotnet#2551 · 1 comment ·
Maintainers usually reply within 1 day
All issues in aws/aws-lambda-dotnet
Similar issues
-
[Bug]: Missing extensions in Agent Card capabilities in v0.3 compat modePossibly taken @hwanders claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
a2aproject/a2a-dotnet#514 · 1 comment ·
Maintainers usually reply within 2 days
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
VS Code
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
AlamoEngine-Tools/pg-starwarsgame-lsp#207 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
elsa-workflows/elsa-core#8593 ·
Maintainers usually reply within 1 day
-
GpioController.QueryComponentInformation() throws NotSupportedException with RaspberryPi3DriverOpenuntriaged
Difficulty 2/5 1-3 hours Newbie friendliness 78/100