Question 1 Todo.io attaches its Lambda function to the VPC so it can reach the MySQL database in a private subnet. Since then, the function's calls to SQS time out. IAM allows sqs:SendMessage. What fixes it?
Choose one answer Learn it: NAT gateway · Lambda · IAM policy · ENI
Question 2 Code inside Todo.io's ECS task must send messages to SQS. Which role should be allowed sqs:SendMessage?
Choose one answer The task role. Correct. The task role is what your code may do. Its credentials are served inside the task. The task execution role. Not this one. That is what ECS itself needs to start the task: pull the image and ship logs. An instance profile on an EC2 host. Not this one. On Fargate there is no host of yours, and the task role keeps permissions per task. A service-linked role. Not this one. Those belong to AWS services, and you can't add permissions to them.
Learn it: ECS and Fargate · IAM role
Question 3 Todo.io's Fargate tasks run in private subnets. Their IAM permissions are correct, but every call they make to SQS times out. What fixes it?
Choose one answer A NAT gateway in a public subnet, with the private subnets routing 0.0.0.0/0 to it. Correct. SQS is a public AWS service. From a private subnet, traffic needs a way out. (VPC endpoints are another fix, in a later level.) An outbound rule in the task's security group. Not this one. Security groups allow outbound traffic by default; the problem is the missing route. A public IP on each task, left in the private subnet. Not this one. A public IP is useless without a route to the internet gateway. More permissions on the task role. Not this one. A permission problem returns AccessDenied, not a timeout.
Learn it: NAT gateway · IAM policy
Question 4 Todo.io's worker is a Lambda function that handles messages from an SQS queue. How do the messages reach the function?
Choose one answer Lambda polls the queue for you (an event source mapping) and runs the function with each batch. Correct. SQS never pushes. Lambda does the polling, so you don't write any. SQS pushes each message to the function. Not this one. SQS only hands out messages to whoever asks. The team writes a scheduled job that copies messages to the function. Not this one. The event source mapping already does this. Through API Gateway. Not this one. API Gateway is for HTTP requests, not for queues.
Learn it: Lambda · SQS
Question 5 A Lambda function with a 60-second timeout processes an SQS queue whose visibility timeout is 30 seconds. Some messages are processed twice. What is the fix?
Choose one answer Raise the queue's visibility timeout well above the function's timeout; AWS suggests at least six times. Correct. A message becomes visible again after 30 seconds, while the first run is still working on it, so a second run picks it up. Shorten how long the queue keeps messages. Not this one. Retention is how long unread messages wait; it doesn't cause repeats. Add a dead-letter queue. Not this one. A DLQ catches messages that keep failing. These ones succeed, just twice. Lower the function's memory. Not this one. That only makes each run slower, which makes it worse.
Learn it: Lambda · SQS (Simple Queue Service)
Question 6 Every morning at 9:00, thousands of Todo.io users add todos within a few minutes. The app writes each todo straight to its database, which can't keep up, and some saves fail. No todo may be lost. What should Todo.io do?
Choose one answer Learn it: SQS (Simple Queue Service) · Design Todo.io with the Queue add-on
Question 7 Todo.io's worker reads jobs from a standard SQS queue. Very rarely, a todo is counted twice in a user's stats. What is the most likely cause, and the right fix?
Choose one answer Learn it: SQS (Simple Queue Service) · Design Todo.io with the Queue add-on
Question 8 What does it mean that an SQS queue decouples Todo.io's app from its worker?
Choose one answer Learn it: SQS (Simple Queue Service)
Question 9 Todo.io's worker is down for three days. Messages keep arriving in its standard SQS queue, which uses the default settings. What happens to them?
Choose one answer They wait in the queue. The default retention is 4 days, and it can be raised to 14. Correct. When the worker comes back, it works through the backlog. They are lost after a few minutes. Not this one. Messages stay until they are deleted or their retention runs out. They are sent back to the app. Not this one. Queues never return messages to the sender. They go straight to the dead-letter queue. Not this one. A DLQ only receives messages that were received and failed too many times.
Learn it: SQS (Simple Queue Service)
Question 10 Todo.io's worker receives a message, then crashes before deleting it. What happens to the message?
Choose one answer Once the visibility timeout passes, it becomes visible again and is retried. Correct. A received message is only hidden, not removed. Deleting it is the worker's way of saying "done". It is lost, because it was already received. Not this one. Receiving only hides it for a while. It was deleted automatically when it was received. Not this one. Only the worker deletes messages. It goes straight to the dead-letter queue. Not this one. Only after failing maxReceiveCount times.
Learn it: SQS (Simple Queue Service)
Question 11 One malformed message makes Todo.io's worker fail every time, so it is retried forever. How should Todo.io deal with messages like this?
Choose one answer Learn it: Dead-letter queue (DLQ)
Question 12 Todo.io's source queue is a FIFO queue. What kind of queue can be its dead-letter queue?
Choose one answer A FIFO queue. Correct. A DLQ must be the same type as its source queue. A standard queue. Not this one. A FIFO queue needs a FIFO DLQ. Any queue in the account. Not this one. The types must match. A CloudWatch log group. Not this one. A DLQ is always another SQS queue.
Learn it: Dead-letter queue (DLQ)
Question 13 Events about each todo must be processed in exactly the order they happened, and only once. Which queue fits?
Choose one answer A FIFO queue. Correct. FIFO queues keep strict order and process each message exactly once. A standard queue. Not this one. Standard queues are faster, but can deliver out of order and occasionally twice. A standard queue with a longer visibility timeout. Not this one. That reduces retries, but promises nothing about order. A dead-letter queue. Not this one. A DLQ is where failed messages go, not a way to keep order.
Learn it: SQS (Simple Queue Service)
Question 14 Todo.io's app gets AccessDenied when it calls SendMessage on its queue. What should be fixed?
Choose one answer The app's role needs a policy allowing sqs:SendMessage on the queue's ARN. Correct. Sending to a queue is an AWS API call, approved by IAM. The queue's security group. Not this one. Queues have no security groups. The queue is full and must be emptied. Not this one. A full queue isn't the cause of AccessDenied. The visibility timeout. Not this one. That affects receiving, not sending.
Learn it: SQS (Simple Queue Service) · IAM policy
Question 15 Todo.io moves "send a welcome email" out of sign-up and into a queue with a worker. What changes for a user who signs up?
Choose one answer Sign-up answers sooner; the email is sent a moment later in the background. Correct. The slow part no longer sits between the user and their response. Sign-up takes longer, because of the queue. Not this one. Dropping a message in a queue is quick. Sign-up fails whenever the email worker is down. Not this one. The message waits in the queue until the worker is back. The email is guaranteed to arrive before the sign-up page loads. Not this one. It is sent afterwards; that is the point.
Learn it: SQS (Simple Queue Service)
Question 16 What does "SQS (Simple Queue Service)" mean?
Choose one answer Learn it: SQS (Simple Queue Service)
Question 17 Which term is this? "A managed queue. One part of your system drops messages in, another takes them out later."
Choose one answer Learn it: SQS (Simple Queue Service)
Question 18 Which AWS term is described by this analogy? "A ticket rail in a restaurant kitchen. Waiters clip orders up, cooks take them down when ready."
Choose one answer Learn it: SQS (Simple Queue Service)
Question 19 What does "Dead-letter queue (DLQ)" mean?
Choose one answer Learn it: Dead-letter queue (DLQ)
Question 20 Which term is this? "A side queue where messages go after failing too many times."
Choose one answer Learn it: Dead-letter queue (DLQ)
Question 21 Which AWS term is described by this analogy? "The "problem orders" tray, so one bad order doesn't block the kitchen."
Choose one answer Learn it: Dead-letter queue (DLQ)