Skip to content

Add note about CloudWatch event compression #141

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

Merged
merged 1 commit into from
Oct 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions doc_source/services-cloudwatchlogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

You can use a Lambda function to monitor and analyze logs from an Amazon CloudWatch Logs log stream\. Create [subscriptions](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/Subscriptions.html) for one or more log streams to invoke a function when logs are created or match an optional pattern\. Use the function to send a notification or persist the log to a database or storage\.

CloudWatch Logs invokes your function asynchronously with an event that contains encoded log data\.
CloudWatch Logs invokes your function asynchronously with an event that contains Base64 encoded and Zip compressed log data\.

**Example Amazon CloudWatch Logs Message Event**
**Example Amazon CloudWatch Logs Message Event**

```
{
Expand All @@ -14,9 +14,9 @@ CloudWatch Logs invokes your function asynchronously with an event that contains
}
```

When decoded, the log data is a JSON document with the following structure\.
When decoded and decompressed, the log data is a JSON document with the following structure\.

**Example Amazon CloudWatch Logs Message Data \(decoded\)**
**Example Amazon CloudWatch Logs Message Data \(decoded\)**

```
{
Expand All @@ -37,4 +37,4 @@ When decoded, the log data is a JSON document with the following structure\.
}
```

For a sample application that uses CloudWatch Logs as a trigger, see [Error Processor Sample Application for AWS Lambda](sample-errorprocessor.md)\.
For a sample application that uses CloudWatch Logs as a trigger, see [Error Processor Sample Application for AWS Lambda](sample-errorprocessor.md)\.