[AWSINTS-3506] feat(go-forwarder): add S3 pipeline (with multiline regex)#1108
Merged
ndakkoune merged 8 commits intoApr 20, 2026
Merged
Conversation
ndakkoune
commented
Apr 17, 2026
Contributor
Author
There was a problem hiding this comment.
If you have a better name for this file and struct type. I hesitated with lambda.go (could be confusing since we're speaking of the forwarder specifically) and context.go (confusing with the context package).
ndakkoune
commented
Apr 17, 2026
ndakkoune
commented
Apr 17, 2026
| } | ||
| }() | ||
|
|
||
| var buf strings.Builder |
Contributor
Author
There was a problem hiding this comment.
To append \n and message without big reallocations.
ndakkoune
commented
Apr 17, 2026
| }() | ||
|
|
||
| var buf strings.Builder | ||
| scanner := bufio.NewScanner(body) |
Contributor
Author
There was a problem hiding this comment.
The default buffer is 64KB. We may want to benchmark it we want to optimize, or put 1-5MB to handle big lines.
Will use a json.Decoder for the big CloudTrail events as single JSON line inside a bucket.
ge0Aja
reviewed
Apr 17, 2026
ge0Aja
reviewed
Apr 17, 2026
ge0Aja
reviewed
Apr 17, 2026
| scanner := bufio.NewScanner(body) | ||
| for scanner.Scan() { | ||
| line := scanner.Text() | ||
| if rc.multilineRegex != nil { |
Contributor
There was a problem hiding this comment.
nit: these could be on a single line
ge0Aja
reviewed
Apr 17, 2026
…ForwarderMetadata
1d9800d to
62ea356
Compare
62ea356 to
3daa8d9
Compare
ge0Aja
reviewed
Apr 20, 2026
ge0Aja
reviewed
Apr 20, 2026
ge0Aja
reviewed
Apr 20, 2026
ge0Aja
approved these changes
Apr 20, 2026
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.
What does this PR do?
Implements the S3 pipeline with multiline regex support.
Motivation
Testing Guideline
Additional Notes
\r\n\fseparator. This non-expected behavior has been fixed.sourceCategoryconstant) in a future PR the CloudTrail implementation (will probably move a lot of things)Types of changes
Check all that apply