AWS SQS / SNS
Consumes from an SQS queue or publishes to an SQS queue / SNS topic. Credentials come from the standard AWS provider chain (environment, profile, instance role) unless supplied explicitly as query params.
URL format
aws://?queue_url=<sqs-url>®ion=<region>
aws:// and aws-sqs:// are both accepted. The host is unused — the queue is
selected by queue_url (required for consumers, and for publishers unless
topic_arn is set for SNS). Point endpoint_url at LocalStack for local
testing.
Examples
Drain an SQS queue into a file, one-shot:
mq-bridge-app copy --drain \
--from 'aws://?queue_url=https://sqs.us-east-1.amazonaws.com/1234/orders®ion=us-east-1' \
--to file:///data/orders.jsonl?format=json
Publish a Postgres table to an SNS topic, one-shot:
mq-bridge-app copy --drain \
--from postgres://user:pass@localhost/app?table=orders \
--to 'aws://?topic_arn=arn:aws:sns:us-east-1:1234:orders®ion=us-east-1'
LocalStack, continuous:
mq-bridge-app copy \
--from 'aws://?queue_url=http://localhost:4566/000000000000/orders®ion=us-east-1&endpoint_url=http://localhost:4566&access_key=test&secret_key=test' \
--to null:
Warning
access_key/secret_keyin the URL are shown here only because LocalStack’stest/testare throwaway values. Never put real credentials in a connector URL — they leak into shell history and process listings. Against real AWS, omit both and let the standard provider chain (env vars,~/.aws/credentials, IAM role) supply them; see Secrets.
Key options
| Option | Purpose |
|---|---|
queue_url | SQS queue URL. Required for consumers; optional for publishers if topic_arn is set. |
topic_arn | Publisher-only: SNS topic ARN to publish to. |
region | AWS region (e.g. us-east-1). |
endpoint_url | Custom endpoint (e.g. LocalStack). |
access_key / secret_key / session_token | Explicit credentials (otherwise the AWS provider chain is used). |
max_messages | Consumer-only: batch size per receive (1–10). |
wait_time_seconds | Consumer-only: long-poll wait (0–20). |
Full field list: reference/aws.md.