Question 1 The Todo.io app runs on an EC2 instance and must write to a DynamoDB table. What is the most secure way to give it AWS credentials?
Choose one answer Learn it: EC2 (Elastic Compute Cloud) · Temporary credentials · IAM role · Design Todo.io on EC2
Question 2 Todo.io runs its app on EC2. A security patch for the operating system is released. Whose job is it to install it?
Choose one answer Learn it: EC2 (Elastic Compute Cloud)
Question 3 Todo.io wants every new app server to start with the same operating system and the same software already installed. What should every launch use?
Choose one answer The same AMI (Amazon Machine Image). Correct. The AMI is the starting disk image: operating system plus whatever you baked in. The same instance type. Not this one. The instance type sets size (CPU and memory), not what is installed. The same security group. Not this one. That decides who can connect, not what runs. The same network interface. Not this one. Each instance gets its own; it carries addresses, not software.
Learn it: EC2 (Elastic Compute Cloud)
Question 4 Todo.io's app server keeps running out of memory. What should Todo.io change?
Choose one answer The instance type, to one with more memory. Correct. The instance type sets how much CPU and memory the server has. The AMI. Not this one. The AMI decides the software, not the hardware. The subnet. Not this one. Moving subnets changes the network, not the server's size. The security group. Not this one. Security groups only filter traffic.
Learn it: EC2 (Elastic Compute Cloud)
Question 5 A Linux test server runs for about 40 minutes a day and is stopped the rest of the time. How is it billed as an On-Demand instance?
Choose one answer Learn it: EC2 (Elastic Compute Cloud)
Question 6 Which of Todo.io's compute choices still leaves Todo.io patching an operating system?
Choose one answer Amazon EC2. Correct. With EC2 you get a server, and the operating system on it is yours to maintain. AWS Lambda. Not this one. Lambda has no server for you to manage. Amazon ECS on Fargate. Not this one. With Fargate, AWS runs and patches the servers under your containers. Amazon API Gateway. Not this one. It is a managed front door with nothing to patch.
Learn it: EC2 (Elastic Compute Cloud) · ECS and Fargate · Lambda
Question 7 Todo.io's app on EC2 writes log files, but nothing shows up in CloudWatch Logs. What is needed?
Choose one answer Install the CloudWatch agent on the instance, and allow the instance's role to write logs. Correct. EC2 doesn't send logs by itself. Lambda and Fargate do, but an instance is your server. Nothing; EC2 sends every file automatically. Not this one. It sends nothing until the agent is set up. Turn on CloudTrail. Not this one. CloudTrail records API calls, not files on an instance. Open an inbound port on the instance. Not this one. The agent sends logs out; nothing needs to come in.
Learn it: EC2 (Elastic Compute Cloud) · CloudWatch Logs
Question 8 Todo.io moves its app from an EC2 instance to a Lambda function. On EC2, the app wrote to DynamoDB with a role attached through an instance profile. What gives the function the same access?
Choose one answer Learn it: Lambda · EC2 (Elastic Compute Cloud) · IAM role
Question 9 Todo.io's API gets a few hundred requests a day and sits idle most of the night, yet it runs on an EC2 instance around the clock. Which swap cuts the cost of the idle hours the most?
Choose one answer Move the API to Lambda. Correct. Lambda is billed per request and per millisecond of run time. An idle function costs nothing, so the quiet hours stop costing anything. Move the API to one ECS task on Fargate that runs all day. Not this one. Fargate bills per second for the vCPU and memory a running task asks for. A task that runs all day is paid for all day, busy or not. Move the API to a bigger EC2 instance so each request finishes sooner. Not this one. An On-Demand instance is billed per second while it runs, whatever it's doing. A bigger instance costs more for the same idle hours. Keep the instance, but stop it during the day. Not this one. A stopped instance pays only for its disk, but the API can't answer while it's stopped, and the busy hours are during the day.
Learn it: Lambda · EC2 (Elastic Compute Cloud) · ECS and Fargate
Question 10 Todo.io's app on EC2 swaps its RDS MySQL database for a DynamoDB table. With RDS, access came down to the database's security group and a password. What decides whether the app may write to the table now?
Choose one answer IAM: the instance's role must allow writes (like dynamodb:PutItem) on the table's ARN. Correct. Every DynamoDB read and write is a signed API call approved by IAM. No connections, passwords or security groups are involved. The table's security group must let the app's security group in. Not this one. DynamoDB has no security groups: it's reached over HTTPS at a public endpoint, and IAM approves each call. A database password, kept somewhere safe and sent with each request. Not this one. DynamoDB has no passwords. The app's role signs each request, and IAM decides. The route table of the app's subnet. Not this one. A route table decides where traffic goes, not whether a call is allowed. Without permission, DynamoDB answers AccessDenied whatever the route.
Learn it: DynamoDB · RDS (Relational Database Service) · EC2 (Elastic Compute Cloud) · IAM policy
Question 11 What does "EC2 (Elastic Compute Cloud)" mean?
Choose one answer Learn it: EC2 (Elastic Compute Cloud)
Question 12 Which term is this? "Rent a virtual server by the second."
Choose one answer Learn it: EC2 (Elastic Compute Cloud)
Question 13 Which AWS term is described by this analogy? "Renting a computer you have to look after yourself."
Choose one answer Learn it: EC2 (Elastic Compute Cloud)
Question 14 In Amazon ECS, what is a running copy of a container (or a group of containers that run together) called?
Choose one answer Learn it: ECS and Fargate
Question 15 Todo.io has packaged its app as a container. It wants to run it without managing any EC2 servers. What should it use?
Choose one answer Amazon ECS with the Fargate launch type. Correct. With Fargate, AWS runs the servers under your tasks; you only say how much CPU and memory each task needs. Amazon ECS with the EC2 launch type. Not this one. Then the containers run on EC2 instances you manage. One large EC2 instance with Docker installed. Not this one. That is a server to patch and a single point of failure. An SQS queue. Not this one. A queue passes messages; it doesn't run containers.
Learn it: ECS and Fargate
Question 16 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 17 A Fargate task fails to start because ECS can't pull the container image or create its log stream. Which role is missing permissions?
Choose one answer The task execution role. Correct. ECS uses the execution role to pull the image and send logs on your behalf, before your code runs. The task role. Not this one. The task role is only used by your code once the task is running. The root user. Not this one. Root is never involved in starting tasks. The developer's IAM Identity Center role. Not this one. The task starts long after the developer clicked deploy, using its own roles.
Learn it: ECS and Fargate
Question 18 What does each Fargate task get in Todo.io's VPC?
Choose one answer Learn it: ECS and Fargate · ENI
Question 19 Todo.io runs containers on ECS with Fargate. Who patches the operating system of the servers the tasks run on?
Choose one answer AWS. Correct. With Fargate the servers are AWS's. You still own what is inside your container image. Todo.io. Not this one. Todo.io never sees those servers. Nobody; they are never patched. Not this one. AWS patches them. The container, at start-up. Not this one. Containers don't patch the server they run on.
Learn it: ECS and Fargate
Question 20 How does output from Todo.io's containers on Fargate reach CloudWatch Logs?
Choose one answer Through the awslogs log driver set in the task definition, using the task execution role. Correct. Each container's output goes to a log stream in a log group you choose. Through CloudTrail. Not this one. CloudTrail records AWS API calls, not container output. By installing the CloudWatch agent on the host. Not this one. With Fargate you have no host to install anything on. By connecting to each task and copying the files. Not this one. There is no need; the log driver ships output as it happens.
Learn it: ECS and Fargate · CloudWatch Logs
Question 21 Todo.io's ECS service is set to keep two tasks running. One task crashes. What happens?
Choose one answer ECS notices and starts a replacement, so two tasks are running again. Correct. An ECS service keeps the number of tasks you asked for, replacing any that stop. Nothing, until someone starts a new task by hand. Not this one. Keeping the desired count is what an ECS service is for. ECS restarts the server under every task. Not this one. It only replaces the task that stopped. ECS emails the team and waits. Not this one. It replaces the task by itself. (You can still set up alarms.)
Learn it: ECS and Fargate
Question 22 Todo.io's monthly export takes about 40 minutes. Which compute choice can run it in one go without managing servers?
Choose one answer A task on ECS with Fargate. Correct. Tasks run as long as they need to. Lambda stops at 15 minutes. A Lambda function with a 40-minute timeout. Not this one. The longest a Lambda function can run is 15 minutes. API Gateway. Not this one. It passes requests to backends; it doesn't run jobs. An SQS queue. Not this one. A queue holds the job; something else still has to run it.
Learn it: Lambda · ECS and Fargate
Question 23 What does "ECS and Fargate" mean?
Choose one answer Learn it: ECS and Fargate
Question 24 Which term is this? "Run containers on AWS. Pick the serverless option and AWS also runs the servers underneath."
Choose one answer Learn it: ECS and Fargate
Question 25 Which AWS term is described by this analogy? "Handing over a packed lunchbox and letting someone else heat it up."
Choose one answer Learn it: ECS and Fargate
Question 26 A Todo.io Lambda function must write to a DynamoDB table. How should it get that permission?
Choose one answer Learn it: IAM role · Lambda
Question 27 Todo.io's API Gateway invokes its Lambda function. In Todo.io's setup, which policy says that API Gateway may invoke the function?
Choose one answer A resource-based policy on the function. Correct. It lives on the function and names the caller (apigateway.amazonaws.com): who may use this resource. The function's execution role. Not this one. The execution role says what the function may do, not who may call it. An SCP on the account. Not this one. SCPs only cap permissions; they never grant them. A security group on the function. Not this one. Security groups filter network traffic. Invoking a function is an AWS API call, decided by IAM.
Learn it: API Gateway · IAM policy · Lambda
Question 28 Todo.io wants an API with no servers to patch or scale. Which combination is the classic serverless pattern?
Choose one answer API Gateway → Lambda → DynamoDB. Correct. Every piece is managed and scales on its own; you pay for requests, not idle servers. EC2 → RDS. Not this one. Both run on servers you size, and EC2 you also patch. API Gateway → EC2 → RDS. Not this one. EC2 still means servers to manage. SQS → CloudWatch Logs. Not this one. That is a queue and a log store; neither serves an API.
Learn it: API Gateway · Lambda
Question 29 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 30 Todo.io's Lambda function processes large uploads and always stops at exactly 15 minutes, unfinished. What is the right fix?
Choose one answer Learn it: Lambda
Question 31 How is Todo.io billed for a Lambda function?
Choose one answer Per request, and for how long each run takes (by the millisecond, scaled by its memory size). Correct. No requests, no compute charge: you never pay for an idle server. Per hour while the function exists. Not this one. An unused function costs nothing to keep. A flat monthly fee per function. Not this one. There is no flat fee. Per GB of code stored only. Not this one. Requests and run time are what you pay for.
Learn it: Lambda
Question 32 Todo.io creates a new Lambda function and doesn't attach it to any VPC. Can it call DynamoDB?
Choose one answer Yes. By default a function runs outside your VPC and can reach public AWS endpoints such as DynamoDB. Correct. With no VPC there are no subnets or security groups involved; IAM decides. No. It needs a NAT gateway first. Not this one. NAT is only needed once a function is attached to a VPC. No. Every function must be in a VPC to reach AWS services. Not this one. The default, outside a VPC, already reaches them. Only if the function has a public IP. Not this one. Lambda functions don't get IP addresses you manage.
Learn it: Lambda · DynamoDB
Question 33 When should Todo.io attach a Lambda function to its VPC?
Choose one answer When it needs to reach something private inside the VPC, such as the RDS database. Correct. Attaching gives the function network interfaces in your subnets, so it can reach private resources. Whenever it needs the internet. Not this one. Outside a VPC it already has it. Inside, it would need a NAT gateway. To make it run faster. Not this one. Speed comes from memory size, not from the VPC. Always; IAM only works inside a VPC. Not this one. IAM has nothing to do with VPCs.
Learn it: Lambda
Question 34 How many execution roles does a Lambda function have?
Choose one answer Exactly one. Its permissions are everything the function's code can do in AWS. Correct. Give that one role only what the function needs. One per caller. Not this one. Who may call the function is set by its resource-based policy, not by extra roles. One per run. Not this one. Every run uses the same role. None. Functions get permissions from the account. Not this one. Nothing gets permissions just by being in an account.
Learn it: Lambda · IAM role
Question 35 Todo.io's Lambda function prints log lines, but nothing appears in CloudWatch Logs. What is the most likely cause?
Choose one answer Its execution role doesn't allow writing logs (such as logs:CreateLogStream and logs:PutLogEvents). Correct. Lambda sends output to CloudWatch Logs automatically, using the function's own role. Lambda can't send logs anywhere. Not this one. It sends them to CloudWatch Logs by default. The CloudWatch agent isn't installed. Not this one. The agent is for EC2. Lambda needs nothing installed. CloudTrail is turned off. Not this one. CloudTrail records API calls; it isn't where function output goes.
Learn it: Lambda · CloudWatch Logs
Question 36 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 37 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 38 Todo.io moves its API to Lambda. Which of these is still Todo.io's job?
Choose one answer The function's code and the permissions in its execution role. Correct. AWS runs the servers, the operating system and the scaling. What your code does, and what it is allowed to do, stay yours. Patching the operating system. Not this one. With Lambda there is no operating system for you to patch. Adding servers when traffic grows. Not this one. Lambda scales by itself. Replacing failed hardware. Not this one. Hardware is always AWS's job.
Learn it: Lambda
Question 39 Todo.io's Lambda function, not attached to any VPC, swaps its DynamoDB table for an RDS MySQL database in a private subnet. Which two network changes let the function reach the database?
Choose two answers Choose two.
Learn it: Lambda · Subnet · Security group · RDS (Relational Database Service) · NAT gateway
Question 40 Todo.io moves "update the monthly stats" out of its API function and into a worker, with an SQS queue between them. What should the API function's execution role gain?
Choose one answer sqs:SendMessage on that queue's ARN.Correct. Sending is an AWS API call approved by IAM. Least privilege: only the action the job needs, only on the queue it uses. sqs:* on *, so it keeps working if more queues are added.Not this one. That allows every SQS action on every queue in the account. Least privilege means the one action on the one queue. Nothing: open port 443 on the queue's security group instead. Not this one. SQS is a public AWS service outside your VPC, with no security group. IAM decides who may send. Nothing: an account's functions may send to its queues by default. Not this one. A function can do only what its execution role allows. Without the permission, SendMessage fails with AccessDenied.
Learn it: SQS (Simple Queue Service) · Lambda · IAM policy · VPC (Virtual Private Cloud)
Question 41 What does "Lambda" mean?
Choose one answer Learn it: Lambda
Question 42 Which term is this? "Upload a function; AWS runs it only when something calls it."
Choose one answer Learn it: Lambda
Question 43 Which AWS term is described by this analogy? "A taxi. You pay for the ride, not for owning the car."
Choose one answer Learn it: Lambda
Question 44 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 45 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 46 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 47 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 48 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 49 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 50 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 51 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 52 What does "SQS (Simple Queue Service)" mean?
Choose one answer Learn it: SQS (Simple Queue Service)
Question 53 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 54 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 55 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 56 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 57 What does "Dead-letter queue (DLQ)" mean?
Choose one answer Learn it: Dead-letter queue (DLQ)
Question 58 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 59 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)