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

[FEATURE] Support various EventBridge messages in S3 source #3426

Open
oraharsh opened this issue Sep 16, 2023 · 4 comments
Open

[FEATURE] Support various EventBridge messages in S3 source #3426

oraharsh opened this issue Sep 16, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@oraharsh
Copy link

Is your feature request related to a problem?

Yes, S3 log pipeline – Listens to S3 Amazon SQS notifications generated via eventbridge and pulls data from S3 buckets. I am getting invalid body which cannot be parsed into S3EventNotification. Unrecognized field "version" (class org.opensearch.dataprepper.plugins.source.S3EventNotification), not marked as ignorable (one known property: "Records"]

What solution would you like?

I want any sqs event generated via s3-sqs,s3-sns or s3-eventbridge-sqs should be parsed in ingest pipeline source as s3.

What alternatives have you considered?

Right now I dont have any alternative

Do you have any additional context?

2023-09-16T11:58:29.321 [Thread-11] ERROR org.opensearch.dataprepper.plugins.source.parser.S3EventNotificationParser - SQS message with message ID:414afe99-8914-4fb4-b9ed-782c228a0ddb has invalid body which cannot be parsed into S3EventNotification. Unrecognized field "version" (class org.opensearch.dataprepper.plugins.source.S3EventNotification), not marked as ignorable (one known property: "Records"])
at [Source: UNKNOWN; byte offset: #UNKNOWN] (through reference chain: org.opensearch.dataprepper.plugins.source.S3EventNotification["version"]).

@oraharsh oraharsh added enhancement New feature or request untriaged labels Sep 16, 2023
@ReinGrad
Copy link

It looks like the issue you are facing is that the SQS messages generated by Amazon EventBridge contain an additional "version" field that the S3EventNotificationParser in opensearch-py is not expecting.

Since EventBridge uses a different message format than plain S3 notifications, the parser needs to be updated to handle the extra EventBridge-specific fields.

@wbeckler wbeckler transferred this issue from opensearch-project/opensearch-py Oct 3, 2023
@dlvenable dlvenable changed the title [FEATURE] [FEATURE] Support various EventBridge messages in S3 source Oct 31, 2023
@dlvenable
Copy link
Member

@oraharsh , Do you have an example input that we can use?

It seems from the description that there is a field version in the input model which is not part of the Data Prepper model. One way to help solve this would be to be more flexible in our model. Only require and expect what we know we need. Ignore any other fields.

@dlvenable dlvenable added this to the v2.7 milestone Oct 31, 2023
@dlvenable dlvenable modified the milestones: v2.7, v2.8 Dec 13, 2023
@dlvenable dlvenable removed this from the v2.8 milestone Apr 16, 2024
@Cihaan
Copy link

Cihaan commented Jun 10, 2024

hey @dlvenable @oraharsh, any update on this matter ? i am having the exact same issue on my pipeline

@Cihaan
Copy link

Cihaan commented Jun 11, 2024

all good, it is mentioned in the docuementation.

there is a property called notification_source that should take either the value eventbridge for the eventbridge as the middleman or s3 for the event directly sent to sqs.

more detail here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

5 participants