0
0
AWScloud~20 mins

SNS and SQS integration pattern (fan-out) in AWS - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
SNS-SQS Fan-out Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
SNS Fan-out Pattern: Message Delivery Count

You have an SNS topic connected to two SQS queues using the fan-out pattern. When a single message is published to the SNS topic, how many messages will each SQS queue receive?

AEach SQS queue receives multiple copies of the message.
BOnly one SQS queue receives the message; the other receives none.
CEach SQS queue receives exactly one copy of the message.
DNo SQS queue receives the message automatically.
Attempts:
2 left
💡 Hint

Think about how SNS distributes messages to multiple subscribers.

Architecture
intermediate
2:00remaining
Designing for Message Durability in SNS to SQS Fan-out

You want to ensure that messages published to an SNS topic are not lost even if one of the SQS queues is temporarily unavailable. Which configuration best supports this requirement?

ASet SQS queues to non-durable mode to improve performance.
BUse SNS only without SQS queues to simplify the architecture.
CConfigure SQS queues without DLQs and rely on SNS to store messages.
DEnable SNS message retries and configure SQS queues with dead-letter queues (DLQs).
Attempts:
2 left
💡 Hint

Consider how to handle message failures and retries in distributed systems.

security
advanced
2:00remaining
Securing SNS to SQS Fan-out Communication

To restrict which SNS topics can send messages to your SQS queues in a fan-out pattern, what is the best practice?

AAttach an SQS queue policy that allows only specific SNS topic ARNs to send messages.
BUse IAM roles on the SNS topic to restrict sending messages.
CEnable encryption on the SNS topic to block unauthorized messages.
DConfigure SNS topic policies to deny all SQS queues.
Attempts:
2 left
💡 Hint

Think about how SQS controls who can send messages to it.

Configuration
advanced
2:00remaining
Configuring SQS Queue to Receive Messages from SNS Topic

Which AWS CLI command correctly subscribes an SQS queue to an SNS topic to implement fan-out?

Aaws sns add-subscription --topic arn:aws:sns:region:123456789012:MyTopic --protocol sqs --endpoint arn:aws:sqs:region:123456789012:MyQueue
Baws sns create-subscription --topic-arn arn:aws:sns:region:123456789012:MyTopic --protocol sqs --endpoint arn:aws:sqs:region:123456789012:MyQueue
Caws sns subscribe --topic-arn arn:aws:sns:region:123456789012:MyTopic --protocol sqs --notification-endpoint arn:aws:sqs:region:123456789012:MyQueue
Daws sqs subscribe --queue-url https://sqs.region.amazonaws.com/123456789012/MyQueue --topic-arn arn:aws:sns:region:123456789012:MyTopic
Attempts:
2 left
💡 Hint

Check the exact AWS CLI command syntax for SNS subscriptions.

Best Practice
expert
2:00remaining
Optimizing Throughput in SNS to SQS Fan-out Architecture

You have an SNS topic fan-out to multiple SQS queues. You notice message processing is slow due to high message volume. Which approach best improves throughput without losing messages?

AEnable batching on SQS consumers and increase the number of consumers per queue.
BReduce the number of SQS queues subscribed to the SNS topic.
CDisable message deduplication on SQS queues to speed up processing.
DIncrease the SNS message delivery retry interval to reduce load.
Attempts:
2 left
💡 Hint

Think about how to process messages faster in queues.