Question 1 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 2 A developer may create Lambda functions, but gets AccessDenied when choosing an existing execution role for a new function. What is missing?
Choose one answer Learn it: iam:PassRole
Question 3 What does a security group attach to?
Choose one answer Learn it: ENI (Elastic Network Interface) · Security group
Question 4 Todo.io's backend runs on Lambda. Browsers need an HTTPS address to send requests to. What should sit in front of the function?
Choose one answer Learn it: API Gateway
Question 5 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 6 Todo.io's Lambda function tries to push a message to a browser by POSTing to the WebSocket API's @connections URL, and gets AccessDenied. What fixes it?
Choose one answer Allow execute-api:ManageConnections in the function's execution role. Correct. Pushing to a connection is an AWS API call, so IAM must allow it like any other. Open port 443 in the function's security group. Not this one. AccessDenied is an IAM answer. A network problem would time out instead. Enable CORS on the API. Not this one. CORS is about browsers calling across websites. This call comes from Lambda. Give the browser an IAM role. Not this one. The browser is the receiver here, and app users are never IAM principals.
Learn it: WebSocket (API Gateway WebSocket API) · IAM policy
Question 7 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 8 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 9 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 10 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 11 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 12 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 13 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 14 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 15 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 16 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 17 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 18 A Lambda function that isn't attached to a VPC writes to DynamoDB. Which security group is involved?
Choose one answer None. With no VPC there are no security groups, and DynamoDB has none either; IAM decides. Correct. Security groups only exist on network interfaces in a VPC. The VPC's default security group. Not this one. The function isn't in the VPC. The DynamoDB table's security group. Not this one. Tables have no security groups. The NAT gateway's security group. Not this one. There is no NAT gateway on this path, and NAT gateways don't take security groups.
Learn it: DynamoDB · Security group
Question 19 What does "Lambda" mean?
Choose one answer Learn it: Lambda
Question 20 Which term is this? "Upload a function; AWS runs it only when something calls it."
Choose one answer Learn it: Lambda
Question 21 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