---
title: AWS SQS
slug: telemetry-pipeline/aws-sqs
docTags: 
createdAt: 2025-04-21T00:48:43.940Z
---

## AWS SQS Source

The AWS SQS source collects events from **Amazon Simple Queue Service (SQS)** and converts queued messages into observability signals. Depending on the payload and decoding configuration, this source can emit **logs, metrics, or traces**.

It is designed to run in an **aggregator** role and is commonly used to centralize data produced by distributed systems, serverless workloads, and decoupled application components.

## Collection Model

- Pull-based polling of SQS queues&#x20;
- Concurrent consumers fetch messages from the queue&#x20;
- Messages are decoded into structured events&#x20;
- Successfully processed messages are deleted from the queue&#x20;

The source operates statelessly and relies on SQS visibility timeouts to guarantee reliable delivery.

## Queue Configuration

### queue\_url (required, string)

Specifies the URL of the SQS queue to poll for messages.

Operational considerations:

- The queue must exist and be accessible&#x20;
- Permissions must allow ReceiveMessage, DeleteMessage, and ChangeMessageVisibility&#x20;
- FIFO and standard queues are both supported&#x20;

## Authentication and Authorization

### auth (optional, object)

Defines how the source authenticates with AWS services.

Supported authentication strategies include:

- Static credentials (access key and secret key)&#x20;
- IAM roles with assume\_role&#x20;
- AWS credentials files and named profiles&#x20;
- Instance Metadata Service (IMDS)&#x20;

The source follows AWS best practices and supports the standard AWS credential resolution chain.

### IMDS Configuration

When running on EC2, ECS, or EKS, credentials can be automatically retrieved via **IMDS**.

IMDS-related settings control:

- Connection timeout&#x20;
- Read timeout&#x20;
- Retry attempts when fetching credentials&#x20;

## Region and Endpoint Resolution

### region (optional, string)

Defines the AWS region for the target SQS service.

If not set, the region is inferred from:

- The queue URL&#x20;
- Environment configuration&#x20;
- AWS SDK defaults&#x20;

### endpoint (optional, string)

Allows overriding the AWS endpoint.

This is typically used for:

- AWS-compatible services&#x20;
- Local testing environments&#x20;
- Private cloud or emulated SQS endpoints&#x20;

## Message Polling Behavior

### poll\_secs (optional, uint)

Controls how long the source waits while polling the queue.

Notes:

- Messages are consumed immediately when available&#x20;
- Increasing this value does not slow down consumption&#x20;
- Generally should not be modified unless explicitly required&#x20;

### client\_concurrency (optional, uint)

Controls the number of concurrent polling tasks.

Higher values may be beneficial when:

- Message throughput is high&#x20;
- Messages are small&#x20;
- CPU resources are underutilized&#x20;

### visibility\_timeout\_secs (optional, uint)

Defines how long a message remains invisible after being received.

If processing exceeds this duration:

- The message becomes visible again&#x20;
- Another consumer may reprocess it&#x20;
- This can lead to duplicate events&#x20;

The timeout should be aligned with worst-case processing time.

## Message Lifecycle Control

### delete\_message (optional, bool)

Controls whether messages are deleted after successful processing.

Disabling deletion can be useful for:

- Debugging&#x20;
- Validation during initial setup&#x20;
- Replay scenarios&#x20;

In production environments, this should remain enabled.

## Decoding Configuration

### decoding (optional, object)

Defines how raw message payloads are decoded into events.

The decoding stage determines:

- Event type (log, metric, trace)&#x20;
- Field structure&#x20;
- Timestamp parsing&#x20;
- Schema validation behavior&#x20;

### Supported Codecs

The source supports multiple decoding codecs, including:

- Raw bytes&#x20;
- JSON&#x20;
- Syslog&#x20;
- GELF&#x20;
- InfluxDB line protocol&#x20;
- Protobuf&#x20;
- Avro&#x20;
- OTLP (logs, metrics, traces)&#x20;
- Native Vector formats&#x20;
- VRL-based custom decoding&#x20;

Some codecs are experimental and may evolve over time.

### VRL Decoding

When using VRL decoding:

- Each message is passed through a VRL program&#x20;
- The final .target defines the decoded event&#x20;
- Compilation or runtime errors cause decoding failures&#x20;

This approach enables advanced transformation and enrichment during ingestion.

## Framing Configuration

### framing (optional, object)

Controls how raw byte streams are split into individual messages.

Supported framing methods include:

- Byte-based framing&#x20;
- Character-delimited&#x20;
- Newline-delimited&#x20;
- Length-delimited&#x20;
- Octet-counting&#x20;
- Chunked GELF&#x20;
- Varint length-delimited&#x20;

Framing configuration is critical when messages contain multiple events or non-trivial binary formats.

## Proxy Support

### proxy (optional, object)

Configures HTTP(S) proxy usage for AWS API requests.

This is useful in:

- Restricted network environments&#x20;
- Controlled egress architectures&#x20;
- Enterprise proxy setups&#x20;

Proxy bypass rules can be defined per host or network.

## TLS Configuration

### tls (optional, object)

Controls TLS behavior for outgoing connections.

Capabilities include:

- Custom CA certificates&#x20;
- Client certificate authentication&#x20;
- ALPN protocol configuration&#x20;
- Certificate and hostname verification&#x20;

Disabling certificate or hostname verification is strongly discouraged in production.

## Acknowledgements and Delivery Semantics

- End-to-end acknowledgements are supported&#x20;
- Source-level acknowledgement settings are deprecated&#x20;
- Reliability is managed at the global or sink level&#x20;
- Duplicate delivery is possible under retry conditions&#x20;

Downstream systems should be idempotent.

## Security Considerations

- IAM permissions should follow least-privilege principles&#x20;
- Queue access should be restricted to authorized producers and consumers&#x20;
- TLS verification should remain enabled&#x20;
- Visibility timeouts should be carefully tuned to avoid message replay storms&#x20;

## Common Use Cases

- Centralized log ingestion from distributed producers&#x20;
- Decoupled observability pipelines&#x20;
- Serverless and event-driven architectures&#x20;
- OTLP signal ingestion via SQS&#x20;
- Buffered ingestion for bursty workloads
