---
name: configure-aws-messaging-and-streaming
description: "Chooses an AWS messaging or streaming service and applies the delivery, dead-letter, and secret rules. Use when the user wants SQS, SNS, EventBridge, Kinesis, Firehose, or MSK between application components. Customer email, SMS, and WhatsApp are a different task."
license: Apache-2.0
metadata:
  category: backend
  tags: "aws,messaging,queues"
  author: johnny-bravo
  version: "1.0"
  updated: "2026-11-25"
  status: published
  aliases: "sqs, sns, eventbridge, kinesis, firehose, msk, amazon mq"
  source_url: "https://github.com/aws/agent-toolkit-for-aws/blob/04afec8286a31958b9e5c5308f8fbf0e98818933/skills/core-skills/aws-messaging-and-streaming/SKILL.md"
  source_license: Apache-2.0
  copyright: "Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved."
  original_author: "Amazon Web Services (aws/agent-toolkit-for-aws)"
  modified: "Modified by TheSkillVault on 2026-11-25. Rewritten as a short choice and integration guide. Channel setup for email, SMS, and WhatsApp was not copied. Quotas must be checked on the current AWS docs. Not the original file."
  imported_on: "2026-11-25"
---

# Configure AWS messaging and streaming

Messaging hands a payload to a worker, then deletes it. Streaming keeps an ordered log so other readers can replay it. Customer messages to a person are a third group. Do not mix the three.

Check quotas, versions, and alarm numbers on the current AWS docs. If you are not sure, say so. A made-up limit is worse than an unchecked one.

## When to use
- The user must pick SQS, SNS, EventBridge, Amazon MQ, Kinesis, Firehose, Flink, or MSK.
- A queue, topic, or stream already exists and delivery, a dead-letter queue, or a secret is wrong.
- The user asks which AWS service sends email, SMS, or WhatsApp to a customer.

## When not to use
- The user wants you to configure SES, SMS, or WhatsApp. Name the service, then stop. Do not invent that channel's setup.
- The user wants CloudWatch queries or alarms for a service that is already failing. Use configure-aws-observability.
- The user wants a Redis cache. Use add-upstash-redis.

## Pick the service
Messaging, one consumer or a fan-out, then the message is gone:

- SQS for a work queue. Standard is at-least-once. FIFO is per group. Use it when workers compete for tasks.
- SNS when every subscriber must get a copy. Subscribers can be SQS, Lambda, or HTTPS.
- EventBridge when the route depends on the event body, or the event comes from another account or a SaaS app.
- Amazon MQ only to keep an existing JMS, AMQP, or MQTT app. Do not start a new app there.

Streaming, retained and replayable:

- Kinesis Data Streams for AWS-native readers that need order inside a shard.
- Firehose when the job is delivery to storage or analytics and you do not want to manage shards.
- Managed Service for Apache Flink when you need windows, joins, or other stateful stream math.
- MSK when the app already speaks Kafka. Keep the Kafka client. Do not rewrite it as SQS.

## People, not services
Email to a customer is Amazon SES. SMS, MMS, RCS, and voice are AWS End User Messaging SMS. WhatsApp is AWS End User Messaging Social. Mobile push is AWS End User Messaging Push. Say which one owns the channel. Then stop. This skill does not configure those channels.

## Steps
1. Say whether the payload is a task, a replayable log, or a message to a person. Stop if it is a person.
2. Pick one service from the lists above. Say the one you did not pick, in one line.
3. For a new SQS queue, set long polling. `ReceiveMessageWaitTimeSeconds` should be 20. The default is short polling.
4. Put a dead-letter queue on the source that can fail. The queue policy must allow `sqs:SendMessage` for that service principal. Scope it with `aws:SourceArn`. Attaching the queue without the policy drops messages with no error you will notice.
5. EventBridge needs `events.amazonaws.com` on that policy, and the source ARN is the rule. SNS needs `sns.amazonaws.com`, and the source ARN is the topic. Add `aws:SourceAccount` as well.
6. Request SQS system attributes by name. `AWSTraceHeader`, `SenderId`, and `SentTimestamp` are not user message attributes. `MessageAttributeNames` does not return them.
7. For SNS that lands in S3 through Firehose, leave `AppendDelimiterToRecord` off. SNS already writes the newline. Turning the processor on makes a blank line between records.
8. Store broker passwords and Kafka SASL credentials in Secrets Manager. Do not put them in a connection string, a JAAS file, a committed env file, or chat. An MSK SASL secret needs the `AmazonMSK_` prefix and a customer-managed key.
9. Quote a quota only after you open the current doc. Otherwise say the number is unchecked.

## Gotchas
- A queue policy that trusts a service principal with no `aws:SourceArn` lets another account's rule or topic send messages. That is the confused deputy.
- FIFO ordering is per message group. It is not global. Standard queues do not promise order.
- A streaming reader that only stores an offset can replay. A messaging consumer that deleted the message cannot.
- Do not paste a secret into the chat to "test the connection".

## Portability
Works with the AWS SDK in any language, or the AWS CLI. Another cloud's queue is a different product. If you are using RabbitMQ that you still run yourself, Amazon MQ is only the lift-and-shift path. A new app should not start there.

## Example prompt
"We need a work queue between the API and a worker. Use SQS with long polling and a dead-letter queue. The queue policy must allow the rule with aws:SourceArn. Do not put the secret in the repo."

## Done when
- The choice is messaging, streaming, or a customer channel, and the service matches that choice.
- A dead-letter queue has a policy with the service principal and `aws:SourceArn`.
- Production SQS uses long polling.
- Passwords and SASL secrets are in Secrets Manager, not in git or chat.
- Any number you quoted was checked, or you said it was not.

---
Modified from "aws-messaging-and-streaming" in aws/agent-toolkit-for-aws (Apache-2.0). Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. See LICENSE.txt and NOTICE.txt.
