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: EventBridge PutEvents not failing invalid entries #10675

Open
1 task done
KrazyK786 opened this issue Apr 16, 2024 · 0 comments
Open
1 task done

bug: EventBridge PutEvents not failing invalid entries #10675

KrazyK786 opened this issue Apr 16, 2024 · 0 comments
Labels
aws:events Amazon EventBridge status: backlog Triaged but not yet being worked on type: bug Bug report

Comments

@KrazyK786
Copy link

KrazyK786 commented Apr 16, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

When making a PutEvents call against LocalStack, the provided entries do not appear to be validated for Detail, DetailType, and Source, per the the corresponding behavior of AWS.

Expected Behavior

When making a PutEvents request to LocalStack, I expect to receive failed entries for entries that do not have the required Detail, DetailType, and Source.

How are you starting LocalStack?

Custom (please describe below)

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 \
  --endpoint-url http://localhost:4566 \
  --region us-east-1 \
  --entries '[{"DetailType": "Test", "Detail": "{\"test1\": \"test2\"}", "Source": "testing.123"}, {"DetailType": "Test2"}]'

running against LocalStack returns:

{
    "FailedEntryCount": 0,
    "Entries": [
        {
            "EventId": "a4aa1d31-4d45-4894-8534-61e0a3d6778e"
        },
        {
            "EventId": "5a52b29c-6d4f-4e9b-9457-0dcb7717229f"
        }
    ]
}

running against AWS returns:

{
    "FailedEntryCount": 1,
    "Entries": [
        {
            "EventId": "28bc32af-7944-0a4f-dfe0-f75703d4b8db"
        },
        {
            "ErrorCode": "InvalidArgument",
            "ErrorMessage": "Parameter Source is not valid. Reason: Source is a required argument."
        }
    ]
}

Environment

- OS: macOS Sonoma 14.4.1
- LocalStack: latest

Anything else?

We did find a previous issue that seemed to address this scenario and referenced the AWS documentation for PutEvents; while it does still list Detail, DetailType, and Source as "Required: No", they have added notes that any entries missing these fields will fail. (We have put a request in to AWS for clearer documentation on this issue.)

@KrazyK786 KrazyK786 added status: triage needed Requires evaluation by maintainers type: bug Bug report labels Apr 16, 2024
@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
aws:events Amazon EventBridge status: backlog Triaged but not yet being worked on type: bug Bug report
Projects
None yet
Development

No branches or pull requests

2 participants