Amazon Simple Notification Service (SNS) (SNS)
Distributes a single published message simultaneously to multiple subscriber endpoints (SQS queues, Lambda functions, HTTP webhooks, SMS, and email) with message filtering, envelope encryption via AWS KMS, and dead-letter redrive.
AWS Container Placement
Regional / Global Managed Scope (Outside VPC Subnets)
Summary
High-throughput serverless publish/subscribe (pub/sub) messaging service for fan-out architectures and mobile push notifications.
When to Use (SAA-C03)
Use when multiple independent subscribers must react to the same event in parallel.
Allowed Ingress Connections & Ports
| Source Service | Protocol | Port | Architectural Rationale |
|---|---|---|---|
| EC2 | HTTPS | 443 | EC2 application servers publishing notifications via sns:Publish |
| LAMBDA | HTTPS | 443 | Serverless functions publishing state change events |
| S3 | HTTPS | 443 | S3 Event Notifications published on object creation or deletion |
| INTERFACE-ENDPOINT | HTTPS | 443 | PrivateLink access to SNS from inside private VPC subnets |
Allowed Egress Targets & Ports
| Target Service | Protocol | Port | Data Flow Rationale |
|---|---|---|---|
| SQS | HTTPS | 443 | Direct push delivery to subscribed SQS queue buffers |
| LAMBDA | HTTPS | 443 | Asynchronous serverless function invocation with event payload |
| KMS | HTTPS | 443 | Payload encryption and decryption using AWS KMS keys |
Key Configuration Parameters & AWS Best Practices
| Parameter | Format / Example | Purpose & Rationale |
|---|---|---|
| Topic Name (snsTopicName / name) (Required) | orders-fanout-topic.fifo | The unique name of the Amazon SNS topic within your AWS account and region. Why: AWS requires an explicit name to construct the Topic ARN. |
| Topic Type (topicType) | standard | Determines whether the topic supports unlimited throughput (standard) or strict message ordering and deduplication (fifo). Why: Cannot be changed after topic creation; defines ordering guarantees. |
| KMS Master Key ID (kmsMasterKeyId / kms_master_key_id) | alias/aws/sns | AWS KMS key used for server-side encryption of topic message payloads. Why: Enables encryption at rest to comply with enterprise data security standards. |
| Content-Based Deduplication (content_based_deduplication) | false | Generates a deduplication ID automatically using the SHA-256 hash of the message body. Why: Prevents duplicate publishes during network timeouts without client-side token tracking. |
| Subscription Protocol (subscriptionProtocol) | sqs | The protocol used by subscribers to receive messages pushed by the topic. Why: Specifies the transport mechanism for delivery. |
| Subscription Filter Policy (filter_policy) | {"eventType": ["OrderPlaced"]} | JSON pattern evaluating message attributes to filter out unwanted messages before delivery. Why: Saves downstream consumer compute and bandwidth costs by dropping irrelevant events. |
Practice Labs Using Amazon Simple Notification Service (SNS)
Frequently Asked Questions
Where does Amazon Simple Notification Service (SNS) live inside an AWS VPC architecture?
Valid container placement: Regional / Global Managed Scope (Outside VPC Subnets). Distributes a single published message simultaneously to multiple subscriber endpoints (SQS queues, Lambda functions, HTTP webhooks, SMS, and email) with message filtering, envelope encryption via AWS KMS, and dead-letter redrive.
When should I use Amazon Simple Notification Service (SNS) on the AWS SAA-C03 exam?
Use when multiple independent subscribers must react to the same event in parallel.
Can I simulate Amazon Simple Notification Service (SNS) packet routing without an AWS account?
Yes. CloudTracer simulates Amazon Simple Notification Service (SNS) along with 53 AWS services directly in your browser and exports production Terraform HCL.