[AWS] Skip s3 test events in s3-sqs filebeat input#47635
Merged
kaiyan-sheng merged 7 commits intomainfrom Nov 18, 2025
Merged
Conversation
Contributor
🤖 GitHub commentsJust comment with:
|
Contributor
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
Contributor
|
Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services) |
efd6
reviewed
Nov 18, 2025
Kavindu-Dodan
approved these changes
Nov 18, 2025
Contributor
Kavindu-Dodan
left a comment
There was a problem hiding this comment.
LGTM and thanks for the improvement 🙌
Contributor
|
@Mergifyio backport 8.19 9.1 9.2 |
Contributor
✅ Backports have been createdDetails
|
mergify bot
pushed a commit
that referenced
this pull request
Nov 18, 2025
* Skip s3 test events * add changelog * update changelog * keep only event field in s3TestEvent * add Event into s3EventsV2 * add comment and change variable name for processing s3-sns-sqs (cherry picked from commit a4e336c)
6 tasks
mergify bot
pushed a commit
that referenced
this pull request
Nov 18, 2025
* Skip s3 test events * add changelog * update changelog * keep only event field in s3TestEvent * add Event into s3EventsV2 * add comment and change variable name for processing s3-sns-sqs (cherry picked from commit a4e336c)
mergify bot
pushed a commit
that referenced
this pull request
Nov 18, 2025
* Skip s3 test events * add changelog * update changelog * keep only event field in s3TestEvent * add Event into s3EventsV2 * add comment and change variable name for processing s3-sns-sqs (cherry picked from commit a4e336c)
This was referenced Nov 18, 2025
kaiyan-sheng
added a commit
that referenced
this pull request
Nov 19, 2025
* Skip s3 test events * add changelog * update changelog * keep only event field in s3TestEvent * add Event into s3EventsV2 * add comment and change variable name for processing s3-sns-sqs (cherry picked from commit a4e336c) Co-authored-by: Kaiyan White <kaiyan.sheng@elastic.co>
kaiyan-sheng
added a commit
that referenced
this pull request
Nov 19, 2025
* Skip s3 test events * add changelog * update changelog * keep only event field in s3TestEvent * add Event into s3EventsV2 * add comment and change variable name for processing s3-sns-sqs (cherry picked from commit a4e336c) Co-authored-by: Kaiyan White <kaiyan.sheng@elastic.co>
kaiyan-sheng
added a commit
that referenced
this pull request
Nov 19, 2025
* Skip s3 test events * add changelog * update changelog * keep only event field in s3TestEvent * add Event into s3EventsV2 * add comment and change variable name for processing s3-sns-sqs (cherry picked from commit a4e336c) Co-authored-by: Kaiyan White <kaiyan.sheng@elastic.co>
andrzej-stencel
pushed a commit
to andrzej-stencel/beats
that referenced
this pull request
Dec 1, 2025
* Skip s3 test events * add changelog * update changelog * keep only event field in s3TestEvent * add Event into s3EventsV2 * add comment and change variable name for processing s3-sns-sqs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed commit message
This PR adds support to automatically skip
s3:TestEventmessages in the AWS S3 input. When Amazon S3 sends test notifications after configuring event notifications, these messages are now detected and silently skipped without generating errors or processing attempts.problem
When configuring S3 event notifications, Amazon S3 sends a test message to verify the notification configuration. These test messages use a different format than regular S3 event notifications:
{ "Service":"Amazon S3", "Event":"s3:TestEvent", "Time":"2014-10-13T15:57:02.089Z", "Bucket":"amzn-s3-demo-bucket", "RequestId":"5582815E1AEA5ADF", "HostId":"8cLeGAmw098X5cv4Zkwcmo8vvZa3eH3eKxsPzbB9wrR+YstdA6Knx4Ip8EXAMPLE" }Unlike regular S3 event notifications that use a
Recordsarray structure, test events use a simplified format with direct fields. Previously, the input would attempt to process these test events, which could lead to:RecordsfieldsSolution
This PR adds a logic to identify and skip
s3:TestEventmessages before any processing occurs. The solution handles test events in both directS3→SQSandS3→SNS→SQSmessage flows.Checklist
stresstest.shscript to run them under stress conditions and race detector to verify their stability../changelog/fragmentsusing the changelog tool.Disruptive User Impact
N/A
Related issues