[{"id":"awsintermediate-001","courseId":"aws-intermediate","domain":"compute-and-events","topic":"Static initialization outside the handler","prompt":"A Lambda function gets its first request, and no execution environment exists yet. Put these steps of that cold start in the order Lambda performs them.","hint":"Think about what must exist before any code can run inside it.","explain":"Lambda builds an execution environment before it can run your function for the first time. Code you write outside the handler runs as part of that build, once per environment, not once per request.","source":"https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html#static-initialization","interaction":{"type":"sort","items":[{"text":"Download the function code","why":"The cold start begins by fetching your code package for the new environment."},{"text":"Start the execution environment","why":"Lambda sets up the environment once the code is in place."},{"text":"Run initialization code outside the handler","why":"Static initialization happens once the environment exists, before the handler is called."},{"text":"Run the handler code","why":"The handler runs last, after initialization is complete, to serve the request."}]},"options":[],"answer":"o:abcd","explanation":"Lambda downloads the code and starts the environment during initialization, runs code outside the handler, and then runs the handler.","concept":"Lambda downloads the code and starts the environment during initialization, runs code outside the handler, and then runs the handler.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Code outside the handler runs once per execution environment, during the cold start."]},{"id":"awsintermediate-002","courseId":"aws-intermediate","domain":"compute-and-events","topic":"Lambda reserved concurrency","prompt":"A function that writes to a fragile database has its reserved concurrency set to 0 during a repair. What does this setting do?","hint":"Think about what the setting does to the function's ability to run instances.","explain":"Reserved concurrency sets both a floor and a ceiling for a function's instances, and takes that capacity out of the shared account pool. Limits like this can also protect a downstream resource.","source":"https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html","interaction":{"type":"single"},"options":[{"id":"a","text":"It stops the function from processing any events until the reservation is removed.","why":"Setting reserved concurrency to 0 is the documented way to throttle a function completely."},{"id":"b","text":"It limits the function to one instance at a time, so events run in order.","whyNot":"A limit of 0 allows no instances at all, so it does not allow even one."},{"id":"c","text":"It moves the function's pending events to a dead-letter queue for later retry.","whyNot":"Concurrency settings control how many instances run; they don't move events to another queue."},{"id":"d","text":"It deletes the function's provisioned concurrency to free the account's capacity.","whyNot":"Reserved and provisioned concurrency are separate controls, so this setting doesn't remove provisioned concurrency."}],"answer":"a","explanation":"Setting a function's reserved concurrency to 0 throttles it completely, so it stops processing events until the reservation is removed.","concept":"Setting a function's reserved concurrency to 0 throttles it completely, so it stops processing events until the reservation is removed.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Reserved concurrency is both a minimum and a maximum for a function."]},{"id":"awsintermediate-003","courseId":"aws-intermediate","domain":"compute-and-events","topic":"SQS visibility timeout","prompt":"In a standard SQS queue, the visibility timeout guarantees that no message is ever delivered to two consumers.","hint":"Think about which delivery model standard queues use.","explain":"When a consumer receives a message, SQS hides it from other consumers for the visibility timeout. If the message isn't deleted in time, it becomes visible again. Consider how strong a promise the queue type makes.","source":"https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html","interaction":{"type":"true-false"},"options":[{"id":"a","text":"True","whyNot":"Standard queues use at-least-once delivery, so the timeout can't rule out a second delivery."},{"id":"b","text":"False","why":"The docs say there is no absolute guarantee that a message won't be delivered more than once during the visibility timeout."}],"answer":"b","explanation":"Because SQS uses an at-least-once delivery model, there is no absolute guarantee that a message won't be delivered more than once during the visibility timeout.","concept":"Because SQS uses an at-least-once delivery model, there is no absolute guarantee that a message won't be delivered more than once during the visibility timeout.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Make consumers idempotent, since the visibility timeout can't guarantee single delivery."]},{"id":"awsintermediate-004","courseId":"aws-intermediate","domain":"compute-and-events","topic":"SQS dead-letter queues","prompt":"A standard source queue moves a message into its dead-letter queue. Which timestamp decides when the dead-letter queue deletes that message?","hint":"Consider which clock a message carries with it through a move.","explain":"Every queue keeps messages for a retention period and then deletes them. Moving a message between queues doesn't always restart the clock, so check which timestamp the queue counts from.","source":"https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html","interaction":{"type":"single"},"options":[{"id":"a","text":"The message's original enqueue timestamp, which the move doesn't change.","why":"For standard queues, expiry is based on the original enqueue timestamp, and a move leaves it unchanged."},{"id":"b","text":"The time the message was moved into the dead-letter queue.","whyNot":"That time is what ApproximateAgeOfOldestMessage shows, not what sets expiry for standard queues."},{"id":"c","text":"The time of the last failed receive on the source queue.","whyNot":"The docs tie expiry to the enqueue timestamp, not to receive attempts."},{"id":"d","text":"The dead-letter queue's creation time plus its retention period.","whyNot":"Retention counts from each message's enqueue time, not from when the queue was created."}],"answer":"a","explanation":"For standard queues, a dead-letter queue measures retention from the message's original enqueue timestamp, which the move does not change.","concept":"For standard queues, a dead-letter queue measures retention from the message's original enqueue timestamp, which the move does not change.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Set a dead-letter queue's retention longer than its source queue's."]},{"id":"awsintermediate-005","courseId":"aws-intermediate","domain":"compute-and-events","topic":"SQS FIFO message groups","prompt":"An order system sends messages through an SQS FIFO queue. Which TWO statements about FIFO queues are true?","hint":"Compare what FIFO adds to a queue against what standard queues offer.","explain":"Standard queues favor throughput and can deliver a message more than once. FIFO queues are a separate type with their own transaction limits. Judge each statement by what each type promises.","source":"https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-fifo-queues.html","interaction":{"type":"multiple","tellCount":true},"options":[{"id":"a","text":"Duplicates aren't introduced into the queue, which gives exactly-once processing.","why":"The docs list no duplicate introduction and exactly-once processing as core FIFO features."},{"id":"b","text":"One queue can hold many ordered message groups, with no quota on how many.","why":"FIFO queues support multiple ordered message groups, and the docs set no quota on their number."},{"id":"c","text":"Throughput is unlimited, so high throughput mode is never needed.","whyNot":"FIFO queues have a limited number of transactions per second; high throughput mode raises that limit."},{"id":"d","text":"Attaching a dead-letter queue never affects message order.","whyNot":"The docs warn that a dead-letter queue can break exact order in a FIFO queue."},{"id":"e","text":"Each FIFO queue is capped at about 120,000 in-flight messages.","whyNot":"That figure is for standard queues; FIFO in-flight limits depend on active message groups."},{"id":"f","text":"Standard queues are the only queues that offer exactly-once processing.","whyNot":"The docs present exactly-once processing as a FIFO feature, not a standard queue one."}],"answer":"ab","explanation":"FIFO queues strictly preserve send and receive order, prevent duplicates from entering the queue, and support multiple ordered message groups with no group quota.","concept":"FIFO queues strictly preserve send and receive order, prevent duplicates from entering the queue, and support multiple ordered message groups with no group quota.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["FIFO trades throughput for order; use high throughput mode if limits bite."]}]