Messaging, integration and business applications
Decoupling one component from another: a queue that holds work until a worker takes it, a topic that tells every subscriber at once, and a state machine that remembers where a multi-step process got to.
Lesson 10 of 11 in objective 3. Cloud technology and services, part of AWS Certified Cloud Practitioner (CLF-C02).
A queue holds work until somebody does it
Amazon SQS is a pull-based queue: producers write messages, a consumer polls for them, and a message stays until it has been processed and deleted. A visibility timeout stops two workers picking up the same message, and a dead-letter queue collects whatever repeatedly fails so it can be looked at rather than lost. The value is loose coupling — either side can be slow, restarting or scaling while the other carries on.
That is why a checkout calling a fulfilment service directly and waiting for an answer is the shape a queue fixes. With the queue in the middle, a spike or an outage in fulfilment becomes a growing backlog instead of failed checkouts and lost orders. The two options offered against it are both real improvements to something else: retries with a longer timeout leave checkout coupled to fulfilment's health and make the customer wait longer before being told it failed, and a larger instance simply raises a ceiling that the next spike goes over in the same way.
A topic tells everybody, once
Amazon SNS is publish-and-subscribe: one message is delivered to every subscriber, and a subscriber can be an email address, an AWS Lambda function, an SQS queue or an HTTPS endpoint. That is the fan-out pattern, and its virtue is that the publisher knows nothing about the destinations — adding a fifth one next month is a subscription rather than a change to the code that publishes.
The misreading the exam tests is using a queue for this. A message on a queue is processed by ONE consumer and then deleted, so four pollers on one queue would each get a share of the messages rather than all of them getting every message. Publishing to a topic whose subscribers are queues is the classic combination, because each consumer then gets its own buffer. Amazon EventBridge does a related job with content-based routing rules and a much wider set of AWS and third-party targets.
When the sequence itself is the problem
When functions invoke each other directly, the orchestration is scattered through the code and nowhere is the state of one application written down — which is precisely the complaint in a stem that says nobody can tell where a stalled request stalled. AWS Step Functions moves the sequence out into a state machine: the order, the retries, the branch when a check comes back negative and the wait for a human approval are all declared outside the functions, and every execution leaves a visible history.
The distractors here are the other integration services doing what they are good at, in the wrong place. More Lambda functions is more of the same scattering. A queue between each pair of steps decouples them beautifully and expresses no sequence and no branching, so one application's state ends up spread across six queues with nothing joining it up. A scheduler starts things at a time, and timing is not the problem.
Applications you buy rather than build
This part of the syllabus also names business applications that are bought whole rather than assembled: Amazon Connect is a cloud contact centre, and Amazon SES sends bulk and transactional email. Their exam value is simply recognising what each one is for, so that an option naming SES in a question about four different destinations can be rejected as solving one quarter of the problem.
The pattern across the whole objective is the same one: each service answers a specific question, and a wrong answer is nearly always a service that answers a neighbouring question well. Sort them by the question and the options stop looking alike — what happens next is Step Functions, who does the work is SQS, who needs to know is SNS, and which of many targets should receive this event is EventBridge.
Worth carrying in
- Amazon SQS
- Pull-based queue. One consumer per message, held until deleted. Buffers a slow worker.
- Visibility timeout
- Hides a message while one consumer works on it, so two do not take the same one.
- Dead-letter queue
- Where messages go after repeatedly failing, so they can be examined rather than lost.
- Amazon SNS
- Publish and subscribe. Every subscriber gets a copy: email, Lambda, SQS, HTTPS.
- Amazon EventBridge
- Event routing with content-based rules to a wide set of AWS and third-party targets.
- AWS Step Functions
- A state machine outside the code: order, retries, branching, waits, and a visible history.
- Amazon Connect
- A cloud contact centre, bought rather than built.
- Amazon SES
- Bulk and transactional email sending.
What the exam does with this
- A queue message goes to ONE consumer and is then deleted. Four systems that each need every message is a topic, and "four consumers poll one queue" is the standard trap.
- Retries and longer timeouts leave the caller coupled to the callee. If the requirement is that the caller succeeds while the other side is down, the answer is a buffer between them.
- SNS pushes as messages arrive; SQS holds them until a worker is ready. "Work through the backlog at its own pace" is a queue in six words.
- Step Functions is the answer when the complaint is that nobody can say which step a process reached. That is visibility of the sequence, not the speed of any one step.
- Objective
- 3. Cloud technology and services
- Share of the exam
- 34% (the whole objective)
- Questions in this lesson
- 3
- Signed for by a person
- 0
Partly checked. None of the 3 questions here has been read against the cited source by a person. 3 questions have been checked against their cited clause by an automated pass — which is not the same thing, and is not a signature.
Only questions a person has signed for are used in mock exams here. That is the whole difference between the two kinds of checking above.
Questions in this lesson
- An online shop's checkout writes the order and then calls the fulfilment service directly, waiting for it to answer. When fulfilment is slow or restarting, checkouts fail and orders are lost. The team wants checkout to accept the order regardless, and fulfilment to work through the backlog at its own pace. What should they introduce? machine-checked
- When a build finishes, four separate things must happen: an email to the release manager, a Lambda function that updates a dashboard, a message into an SQS queue for the deployment worker, and an HTTPS callback to a partner system. The build job must not have to know about any of them, and a fifth destination will be added next month. What should the build publish to? machine-checked
- A loan application passes through six steps — validate, credit check, risk score, human approval, notify, archive — with retries on failure and a different path when the credit check comes back negative. Today these are Lambda functions invoking each other, and when an application stalls nobody can say which step it stalled at. What should the team adopt? machine-checked
Drill this lesson
A lesson is one sitting: the trainer draws a short run from these questions alone and spaces the ones you get wrong.
Practise Messaging, integration and business applications
The rest of objective 3
- Ways in: console, CLI, SDKs and infrastructure as code
- Regions, Availability Zones and edge locations
- EC2 and choosing an instance type
- Containers, serverless, auto scaling and load balancing
- Relational, NoSQL and in-memory databases, and moving them
- VPCs, subnets, traffic controls and private connectivity
- Object storage and the S3 storage classes
- Block, file and hybrid storage, lifecycle rules and backup
- Machine learning and analytics services
- Messaging, integration and business applications — you are here
- Developer tools, end-user computing, front end and IoT