Skip to content
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

bug: PutEvents entries can exceed the AWS limit of 10 #10676

Open
1 task done
ysa-v opened this issue Apr 16, 2024 · 3 comments
Open
1 task done

bug: PutEvents entries can exceed the AWS limit of 10 #10676

ysa-v opened this issue Apr 16, 2024 · 3 comments
Assignees
Labels
aws:events Amazon EventBridge good first issue Good item to work on for newcomers status: backlog Triaged but not yet being worked on type: bug Bug report

Comments

@ysa-v
Copy link

ysa-v commented Apr 16, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When calling AWS eventbridge PutEvents with LocalStack, a PutEventsRequestEntry array with more than 10 entries can go through successfully with a resulting FailedEntryCount of zero.

Expected Behavior

When calling AWS eventbridge PutEvents with LocalStack, a PutEventsRequestEntry array with more than 10 entries should return an error on the entire request.

How are you starting LocalStack?

With a docker-compose file

Steps To Reproduce

How are you starting localstack (e.g., bin/localstack command, arguments, or docker-compose.yml)

docker run localstack/localstack

Client commands (e.g., AWS SDK code snippet, or sequence of "awslocal" commands)

aws events put-events \
 --region us-east-1 \
 --endpoint-url http://localhost:4566 \
 --entries '[{"DetailType": "Test", "Detail": "{\"test1\": \"test1\"}", "Source": "testing.123"},
 {"DetailType": "Test", "Detail": "{\"test2\": \"test2\"}", "Source": "testing.123"},
 {"DetailType": "Test", "Detail": "{\"test3\": \"test3\"}", "Source": "testing.123"},
 {"DetailType": "Test", "Detail": "{\"test4\": \"test4\"}", "Source": "testing.123"},
 {"DetailType": "Test", "Detail": "{\"test5\": \"test5\"}", "Source": "testing.123"},
 {"DetailType": "Test", "Detail": "{\"test6\": \"test6\"}", "Source": "testing.123"},
 {"DetailType": "Test", "Detail": "{\"test7\": \"test7\"}", "Source": "testing.123"},
 {"DetailType": "Test", "Detail": "{\"test8\": \"test8\"}", "Source": "testing.123"},
 {"DetailType": "Test", "Detail": "{\"test9\": \"test9\"}", "Source": "testing.123"},
 {"DetailType": "Test", "Detail": "{\"test10\": \"test10\"}", "Source": "testing.123"},
 {"DetailType": "Test", "Detail": "{\"test11\": \"test11\"}", "Source": "testing.123"},
 {"DetailType": "Test", "Detail": "{\"test12\": \"test12\"}", "Source": "testing.123"}]'

running against LocalStack returns:

{
  "FailedEntryCount": 0,
  "Entries": [
      {
          "EventId": "501b300e-9d74-4179-8421-c3051beb278e"
      },
      {
          "EventId": "2868cde4-af58-44c1-aa8e-ad047f44f621"
      },
      {
          "EventId": "3446d77a-eff3-4364-a295-965607a5f284"
      },
      {
          "EventId": "5a37240a-6f8d-4bd9-a72c-045176537293"
      },
      {
          "EventId": "22d4536d-b20f-496c-ac57-0104677eb192"
      },
      {
          "EventId": "2290624f-c7ac-4670-850a-7ef060ee359e"
      },
      {
          "EventId": "a5b08a14-edb3-4ee7-beb9-28cbe580a778"
      },
      {
          "EventId": "462b1de2-1547-4ecc-a8bc-80009f8ed23e"
      },
      {
          "EventId": "773858d0-7962-4c9d-b93a-91acd5426fcd"
      },
      {
          "EventId": "079afe83-2239-4f4a-a014-32b69707b2b7"
      },
      {
          "EventId": "9fa8f35c-3235-4fe2-ac5d-fffa82858b10"
      },
      {
          "EventId": "96c9a8e8-9800-422f-b29f-fbe3b32f0a90"
      }
  ]
}

running against AWS returns:

An error occurred (ValidationException) when calling the PutEvents operation: 1 validation error detected: 

Value '[PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test1": "test1"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null), PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test2": "test2"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null), PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test3": "test3"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null), PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test4": "test4"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null), PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test5": "test5"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null), PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test6": "test6"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null), PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test7": "test7"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null), PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test8": "test8"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null), PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test9": "test9"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null), PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test10": "test10"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null), PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test11": "test11"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null), PutEventsRequestEntry(time=null, source=testing.123, resources=null, detailType=Test, detail={"test12": "test12"}, eventBusName=null, traceHeader=null, kmsKeyIdentifier=null, internalMetadata=null)]' 

at 'entries' failed to satisfy constraint: Member must have length less than or equal to 10

Environment

- OS: macOS Sonoma 14.4.1
- LocalStack: latest

Anything else?

AWS documentation showing a max of 10 entries for PutEventsRequestEntry:
https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_PutEvents.html

@ysa-v ysa-v added status: triage needed Requires evaluation by maintainers type: bug Bug report labels Apr 16, 2024
@localstack-bot
Copy link
Collaborator

Welcome to LocalStack! Thanks for reporting your first issue and our team will be working towards fixing the issue for you or reach out for more background information. We recommend joining our Slack Community for real-time help and drop a message to LocalStack Pro Support if you are a Pro user! If you are willing to contribute towards fixing this issue, please have a look at our contributing guidelines and our contributing guide.

@cloutierMat cloutierMat added aws:events Amazon EventBridge status: backlog Triaged but not yet being worked on and removed status: triage needed Requires evaluation by maintainers labels Apr 16, 2024
@dfangl dfangl added the good first issue Good item to work on for newcomers label Apr 18, 2024
@saaya-code
Copy link

Hello can I get assigned for this?

@pinzon
Copy link
Member

pinzon commented May 6, 2024

Hi @saaya-code I took the liberty to assign it to you. let me know if you need any help with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:events Amazon EventBridge good first issue Good item to work on for newcomers status: backlog Triaged but not yet being worked on type: bug Bug report
Projects
None yet
Development

No branches or pull requests

6 participants