Choosing Between Similar Developer Services
This lesson gathers the pairs of services that developers most often confuse. Many questions offer two services that both seem to fit, and knowing the one property that separates them answers the question.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish similar messaging and event services by how consumers receive each message.
- Distinguish similar compute and API services.
- Distinguish similar data and configuration services.
Messaging and events
Messaging and event services are the most frequently confused group, because several of them move messages from producers to consumers. The deciding property is usually how many consumers receive each message and how they receive it. Amazon SQS holds messages in a queue for one consumer to pull at its own pace. Amazon SNS pushes each message to every subscriber. Amazon EventBridge also delivers to many targets but routes on the content of the event and receives events from AWS services and SaaS partners. Amazon Kinesis Data Streams keeps an ordered record that several consumers read independently and can replay, and Amazon Data Firehose delivers streaming data to storage and analytics destinations without consumer code.
For each pair in the following table, the second and third columns indicate when the first and the second service, respectively, should be chosen.
| Pair | Choose the first when | Choose the second when |
|---|---|---|
| SQS / SNS | One consumer pulls messages at its own pace | Many subscribers must receive each message |
| SNS / EventBridge | High-throughput fan-out, SMS or push | Content-based routing, AWS or SaaS events, archive and replay |
| SQS / Kinesis Data Streams | Independent tasks, no replay | Ordered stream, several consumers, replay |
| Kinesis Data Streams / Firehose | Custom real-time consumers | Delivery to S3, Redshift or OpenSearch with no code |
Compute and APIs
The following pairs of compute and API services are presented in the same format, indicating when each service in the pair is the appropriate choice.
| Pair | Choose the first when | Choose the second when |
|---|---|---|
| Lambda / Fargate | Event-driven tasks under 15 minutes | Long-running or container-based workloads |
| Step Functions Standard / Express | Long, exactly-once workflows with waits | High-volume, short workflows |
| API Gateway REST / HTTP API | Usage plans, API keys, caching, request validation, WAF | Lower cost and latency, JWT authorizers |
| API Gateway / AppSync | REST resources | GraphQL, data aggregation, real-time subscriptions |
Data and configuration
The following pairs of data and configuration services are presented in the same format, indicating when each service in the pair is the appropriate choice.
| Pair | Choose the first when | Choose the second when |
|---|---|---|
| DynamoDB / Aurora | Key-value access at any scale | Relational queries, joins and transactions |
| DAX / ElastiCache | Caching DynamoDB reads with minimal code changes | Caching anything else, or data structures such as sorted sets |
| Secrets Manager / Parameter Store | Automatic rotation, cross-account sharing | Simple configuration and secrets at low cost |
| Parameter Store / AppConfig | Values read at runtime, changed rarely | Gradual rollout with validation and automatic rollback |
| Cognito user pools / identity pools | Sign-up, sign-in and tokens | Temporary AWS credentials for users |
Three look-alikes
An application must send an order event to an inventory service, a billing service and an analytics pipeline, and each must be able to process events at its own pace. What should the developer use?
SQS alone delivers each message to one consumer. SNS alone pushes to all three but gives them no buffer. The answer is SNS fan-out to three SQS queues: SNS delivers a copy to each queue, and each service consumes its own queue at its own pace.
When does a requirement point to SQS rather than SNS?
Show answer
When messages must wait until a consumer pulls them, for example to absorb load or to retry processing. SNS pushes each message to its current subscribers straight away and does not keep it for later.
Exam Tips
Remember for the exam
- SQS pulls for one consumer; SNS pushes to many; combine them for buffered fan-out.
- Firehose delivers without code; Kinesis Data Streams supports custom consumers and replay.
- DAX caches DynamoDB with minimal code changes; ElastiCache caches anything.
- AppConfig adds safe, gradual configuration rollout over Parameter Store.
- User pools authenticate; identity pools give AWS credentials.