[{"id":"awsbeginner-001","courseId":"aws-beginner","domain":"compute-and-events","topic":"Lambda handler function","prompt":"Your code lives in lambda_function.py, and its entry method is named lambda_handler. Which handler setting tells Lambda where to start?","hint":"The handler setting names two things: where the code is and which method to call.","explain":"Lambda runs one named method in your code each time the function is invoked. The handler setting must point to the right file and to that method.","source":"https://docs.aws.amazon.com/lambda/latest/dg/python-handler.html","interaction":{"type":"single"},"options":[{"id":"a","text":"lambda_function.lambda_handler","why":"The handler is the file name, a dot, then the Python handler function's name."},{"id":"b","text":"lambda_handler.lambda_function","whyNot":"The parts are reversed; the file name comes first, then the function name."},{"id":"c","text":"lambda_function.py:lambda_handler","whyNot":"Lambda joins the parts with a dot, and the documented example drops the .py extension."},{"id":"d","text":"lambda_handler(event, context)","whyNot":"That is the method's signature; the handler setting only names the file and the method."}],"answer":"a","explanation":"The handler setting is the file name and the Python handler function name joined by a dot, such as lambda_function.lambda_handler.","concept":"The handler setting is the file name and the Python handler function name joined by a dot, such as lambda_function.lambda_handler.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","code":"def lambda_handler(event, context):\n    return {'statusCode': 200}","takeaways":["Handler format: file name, a dot, then the function name."]},{"id":"awsbeginner-002","courseId":"aws-beginner","domain":"compute-and-events","topic":"Lambda function timeout","prompt":"Put these console steps for changing a Lambda function's timeout in order.","hint":"Each step opens the screen where the next one happens.","explain":"Timeout is a per-function setting, counted in seconds, with values from 1 to 900. The console, the AWS CLI and AWS SAM can each change it.","source":"https://docs.aws.amazon.com/lambda/latest/dg/configuration-timeout.html","interaction":{"type":"sort","items":[{"text":"Open the Event Functions page of the Lambda console.","why":"Your functions are listed here, so finding the function starts from this page."},{"text":"Choose a function, then choose the Configuration tab.","why":"Timeout is a function setting, so that function's configuration has to be open."},{"text":"Choose General configuration, then choose Edit.","why":"Timeout sits under General configuration, and Edit opens it for changes."},{"text":"For Timeout, enter a value between 1 and 900 seconds.","why":"The new limit is typed into the Timeout field while the edit is open."},{"text":"Choose Save.","why":"Saving commits the edit, so it comes after the new value is entered."}]},"options":[],"answer":"o:abcde","explanation":"The timeout is a per-function setting from 1 to 900 seconds, changed in the console through the function's Configuration tab.","concept":"The timeout is a per-function setting from 1 to 900 seconds, changed in the console through the function's Configuration tab.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Lambda timeout defaults to 3 seconds and can be raised to 900 seconds (15 minutes)."]},{"id":"awsbeginner-003","courseId":"aws-beginner","domain":"compute-and-events","topic":"Lambda execution role","prompt":"Your Lambda function needs an execution role. Which TWO statements about that role are correct?","hint":"Think about who assumes the role, and what the default console role is allowed to do.","explain":"An execution role is an IAM role that grants a function permission to reach other AWS services. Its permissions come from the policies attached to the role.","source":"https://docs.aws.amazon.com/lambda/latest/dg/lambda-intro-execution-role.html","interaction":{"type":"multiple","tellCount":true},"options":[{"id":"a","text":"Lambda automatically assumes the execution role when your function is invoked.","why":"The docs state Lambda assumes the role itself, so your code does not need to."},{"id":"b","text":"The role's trust policy must list lambda.amazonaws.com as a trusted service.","why":"Without that trusted service, Lambda cannot assume the execution role."},{"id":"c","text":"Your code should call sts:AssumeRole on the role to get its permissions.","whyNot":"The docs say to avoid manually assuming the execution role in function code."},{"id":"d","text":"The default console role can read and write any S3 bucket in the account.","whyNot":"The default role includes only AWSLambdaBasicExecutionRole, which logs to CloudWatch Logs."},{"id":"e","text":"AWSLambdaBasicExecutionRole also lets the function update DynamoDB tables.","whyNot":"DynamoDB access needs a separate managed policy such as AWSLambdaDynamoDBExecutionRole."},{"id":"f","text":"The function needs its own IAM user access keys in addition to the role.","whyNot":"Lambda runs the function with the role's permissions, so separate user keys are not needed."}],"answer":"ab","explanation":"The execution role is the IAM role Lambda assumes for your function; its trust policy must name lambda.amazonaws.com.","concept":"The execution role is the IAM role Lambda assumes for your function; its trust policy must name lambda.amazonaws.com.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Lambda assumes the execution role itself; do not call sts:AssumeRole in your code.","The default console role only grants CloudWatch Logs access; add permissions for other services."]},{"id":"awsbeginner-004","courseId":"aws-beginner","domain":"compute-and-events","topic":"EC2 instance types","prompt":"Two EC2 instances run on the same host computer. Which resource does EC2 share between them instead of dedicating it to one instance?","hint":"Some host resources belong to one instance, while others are divided among the instances on the host.","explain":"An instance type sets the hardware an instance gets. EC2 reserves some host resources for each instance and divides others among all instances on the host.","source":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html","interaction":{"type":"single"},"options":[{"id":"a","text":"The network","why":"The docs list the network as a resource EC2 shares among instances on the host."},{"id":"b","text":"Its CPU","whyNot":"CPU is one of the resources EC2 dedicates to a particular instance."},{"id":"c","text":"Its memory","whyNot":"Memory is dedicated to the instance, so it is not shared with other instances."},{"id":"d","text":"Its instance storage","whyNot":"Instance storage is dedicated to the instance, so it is not shared."}],"answer":"a","explanation":"EC2 dedicates CPU, memory and instance storage to each instance, but shares the network and disk subsystem among instances on a host.","concept":"EC2 dedicates CPU, memory and instance storage to each instance, but shares the network and disk subsystem among instances on a host.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Dedicated resources are yours alone; shared resources can vary with what neighbors use."]},{"id":"awsbeginner-005","courseId":"aws-beginner","domain":"compute-and-events","topic":"AMIs as instance templates","prompt":"You have an AMI in us-east-1 and want to launch instances in eu-west-1 with the same configuration. What should you do?","hint":"Think about which AWS boundary an image belongs to, and what you can do with it across that boundary.","explain":"An AMI is an image holding the software and boot setup for an instance. Some of its properties are tied to where and how it was made, which matters when you launch elsewhere.","source":"https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html","interaction":{"type":"single"},"options":[{"id":"a","text":"Copy the AMI to eu-west-1, then launch instances from the copy.","why":"You can copy an AMI to another Region and then use it to launch instances there."},{"id":"b","text":"Launch from the original AMI, since AMIs work in any Region.","whyNot":"An AMI is specific to its Region, so the original is not usable as-is in another one."},{"id":"c","text":"Share the AMI with your eu-west-1 account.","whyNot":"Sharing lets other accounts launch the AMI; the docs describe copying to move it to another Region."},{"id":"d","text":"Change the AMI's Region setting so it launches in eu-west-1.","whyNot":"The docs describe an AMI as Region-specific and show copying as the way to use it in another Region."}],"answer":"a","explanation":"An AMI is specific to its Region, so you copy it to another Region before launching instances there.","concept":"An AMI is specific to its Region, so you copy it to another Region before launching instances there.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["An AMI is a reusable template, and it belongs to the Region where it lives."]}]