CloudWatch

Integration

AWS Access

Either create programmatic access user or provide an existing one.

This user must have the following permissions:

  1. logs:CreateLogGroup
  2. logs:CreateLogStream
  3. logs:PutLogEvents

The AWSAppSyncPushToCloudWatchLogs premade role has these permissions.

Birch

Add the integration to your dashboard.

FieldValueRequired
NameA name to identify the drain
Access Key IDThe access key id of the AWS user used to authenticate
Secret Access KeyThe secret access key of the user used to authenticate
RegionMust match the region of your AWS account
Log Group NameThe log group to place the logs in, many call it birch

Log Format

CloudWatch only supports the following:

  • timestamp
  • message

Log Stream

The log_stream ends up being the identifier of the source.

Example:

Birch.identifier is nil so logs end up in log_group/source_uuid

Another example:

Birch.identifier = user.id so logs end up in log_group/user.id

If the identifier changes on the source, the logs made under the old identifier continue to flow to the old log stream and new logs will flow to the new log stream.