Skip to main content

Supported Data Types

📈 Metrics Select CloudWatch Metrics in the Sawmills source picker to ingest CloudWatch metrics delivered to Amazon S3. The collector polls an Amazon SQS queue for object notifications, downloads the objects, and decodes their CloudWatch Metric Streams JSON records into metrics.
The collector makes outbound requests using its own AWS identity, such as an IAM role for a Kubernetes service account (IRSA). This source needs no inbound endpoint, listener port, or shared access key. The pipeline must include a destination that accepts metrics. For AWS resources, IAM policies, and verification steps, see How to send CloudWatch metrics via S3.

Configuration

The encoding is fixed to CloudWatch Metric Streams JSON (cwmetrics); there is no format selector. Logs, traces, OTLP files, and arbitrary JSON are not supported by this source. The equivalent source configuration data is:
Objects outside the configured bucket or prefix are skipped, and their SQS notifications are deleted once all records in the message are processed or skipped. A wrong bucket or prefix can silently lose metrics even while the queue drains. Prefixes are literal: cwmetrics/ and /cwmetrics/ match different keys. Correcting the source later does not replay deleted notifications.
Use a dedicated queue for this source. An unrelated consumer, or another source with a different bucket or prefix, can consume and delete notifications before the intended source receives them.

AWS permissions

Grant the AWS role used by the collector pods running this source:
  • s3:GetObject on the bucket’s metric objects, scoped to the configured prefix when possible.
  • sqs:ReceiveMessage and sqs:DeleteMessage on the notification queue.
S3 also needs permission to publish notifications to the queue. See the setup guide for the queue policy, collector policy, and encryption considerations.

Processing, retries, and dropped data

Use Sawmills Collector v1.1120.0 or later for the behavior below and its drop counters. The receiver accepts native S3 object notifications, either directly or inside an SNS notification. EventBridge message bodies are not supported. A notification is deleted only when all its records have been processed or skipped; a retryable failure retains the whole message. Monitor these collector counters, grouped by their reason label:
  • otelcol_receiver_awss3_sqs_messages_dropped: unreadable or unsupported notifications.
  • otelcol_receiver_awss3_objects_dropped: unsupported object formats, decompression failures, and decoding failures.
Both counters increase only after SQS message deletion succeeds. Bucket and prefix mismatches are not included in these counters, so verify actual metrics arrival as well as queue consumption. See Monitor the Collector with Prometheus. Retries can process an object again. Even for successfully decoded objects, queue deletion only confirms that the next pipeline component accepted the data; it is not a guarantee that a remote destination has stored it. Check destination health and collector export errors as part of verification.

S3 object retention

The receiver never deletes S3 objects. Set an S3 lifecycle rule on the metrics prefix to expire objects according to your retention policy. Allow enough time for queue backlog, outages, and retries before expiration. An object that expires before the collector downloads it cannot be ingested from its notification.