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

feat: Add template for Cloudwatchlogs lambda function without decompression #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fprzychodni-splunk
Copy link

This PR adds new file that can be used in lambda for Firehouse streams with Decompress source records from Amazon CloudWatch Logs set to On

# processed data). If it's not possible to split because there is only one log event, then mark the record as
# ProcessingFailed, which sends it to error output.
if len(rec["data"]) > 6000000:
cwlRecord = loadJsonGzipBase64(originalRecord["data"])

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loadJsonGzipBase64 is still being called. Required to convert to without decompression.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code updated. loadJsonGzipBase64 Function removed

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

}
...
]
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update this sample message with our actual sample by masking the actual values with dummy values.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
So this example code is how data looks like after it is decoded. So after json.loads(base64.b64decode(r["data"])) object will have fields as listed in this comment

@fprzychodni-splunk fprzychodni-splunk force-pushed the add-template-without-decompression branch 2 times, most recently from a1d74f6 to 9e55db3 Compare April 5, 2024 07:44
@fprzychodni-splunk fprzychodni-splunk force-pushed the add-template-without-decompression branch from 7e3af6e to 1a0a37f Compare April 5, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants