Question 1 An SCP on Todo.io's Prod OU allows s3:*. A role in Prod has no IAM policies that mention S3, and the bucket has no bucket policy. Can the role read objects from a bucket in Prod?
Choose one answer Learn it: SCP (service control policy) · IAM (Identity and Access Management) · Set up AWS: Day 0
Question 2 An SCP on the Prod OU denies a set of RDS actions. Which of these does the SCP NOT restrict?
Choose one answer Learn it: SCP (service control policy) · Service-linked role
Question 3 Todo.io creates a new member account from its management account with AWS Organizations. Nobody knows a password for the new account. How does an administrator get in the first time?
Choose one answer From the management account, assume the OrganizationAccountAccessRole that Organizations created in the new account. Correct. Organizations creates that role in every account it creates, and trusts the management account to assume it. Borrowing a role means no new passwords or keys. Sign in to the new account as root with the management account's password. Not this one. Each account has its own root user and email address. The management account's password doesn't open it. Use the IAM user that Organizations creates for the administrator. Not this one. Organizations creates a role, not an IAM user. Wait for the new account to accept an invitation. Not this one. Invitations are for existing accounts that join. A new account created by the organization is a member at once.
Learn it: AWS Organizations · Set up AWS: Day 0 · IAM role
Question 4 An engineer signs in to the IAM Identity Center access portal and opens the Prod account. What credentials do they get in Prod?
Choose one answer Temporary credentials for a role that Identity Center created from their permission set. Correct. Signing in means assuming a role, so the credentials expire on their own. No long-lived keys exist to leak. The password of an IAM user in Prod. Not this one. Identity Center doesn't create IAM users in the accounts. Permanent access keys for Prod. Not this one. Nothing here is permanent. That's the point. The Prod root user's credentials. Not this one. Root is never handed out by Identity Center.
Learn it: IAM Identity Center · Temporary credentials
Question 5 Todo.io assigns the ReadOnlyAccess permission set to an engineer in its Audit account. What does Identity Center create in the Audit account?
Choose one answer Learn it: Permission set
Question 6 Roles named AWSReservedSSO_AdministratorAccess_… appear in Todo.io's Prod account. Where did they come from?
Choose one answer IAM Identity Center created them when a permission set was assigned in Prod. Correct. Identity Center was formerly called AWS SSO, hence the name. Change them through the permission set, not by hand. An attacker created them. Not this one. The AWSReservedSSO_ prefix is reserved for Identity Center. RDS created them as service-linked roles. Not this one. Service-linked roles are named AWSServiceRoleFor… Account Factory creates them in every account. Not this one. Account Factory sets up sign-in, but these roles come from permission set assignments.
Learn it: IAM Identity Center
Question 7 In Todo.io's Prod account, a developer's role has an IAM policy that allows dynamodb:DeleteTable. An SCP attached to the Prod OU denies dynamodb:DeleteTable. The developer tries to delete a table. What happens?
Choose one answer Learn it: IAM policy · SCP (service control policy) · Set up AWS: Wrong Region
Question 8 Todo.io's founder signs in as the root user every day to manage everything. Which change best follows AWS security best practice?
Choose one answer Learn it: Root user · Set up AWS: Day 0
Question 9 Todo.io creates a new IAM role and attaches no policies to it. What can something using the role do?
Choose one answer Learn it: IAM (Identity and Access Management) · IAM policy
Question 10 Todo.io created an IAM role while the console was set to us-east-1. Can an app running in eu-west-1 use the role?
Choose one answer Yes. IAM is global, so roles aren't tied to a Region. Correct. A few services, IAM among them, are global. Most others, like RDS, are regional. No. The role only exists in us-east-1. Not this one. That's true of most services, but not of IAM. Only after the role is copied to eu-west-1. Not this one. There is nothing to copy; the same role works in every Region. Only if the app signs in through IAM Identity Center. Not this one. Apps use roles directly. Identity Center is for people.
Learn it: IAM (Identity and Access Management) · Region
Question 11 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 12 Which statement describes a resource-based policy?
Choose one answer It is attached to a resource, such as a Lambda function or an S3 bucket, and says who may use that resource. Correct. It names the principal: "API Gateway may invoke this function". The opposite of an identity policy, which is attached to the caller. It is attached to a user, group or role, and says what they may do. Not this one. That is an identity-based policy. It sets the most any identity in an account may do. Not this one. That is an SCP. It decides which Region a resource is created in. Not this one. Policies allow or deny requests. The Region is chosen when you create the resource.
Learn it: IAM policy
Question 13 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 14 Which part of an IAM role decides who is allowed to assume it?
Choose one answer Its trust policy. Correct. The trust policy names who may wear the role, such as ec2.amazonaws.com. The permissions policy says what the wearer can do. Its permissions policy. Not this one. That says what the role can do once assumed, not who may assume it. An SCP on the account. Not this one. An SCP caps what the role can do. It doesn't name who may assume it. The role's ARN. Not this one. The ARN is only the role's name.
Learn it: IAM role
Question 15 Todo.io's report job only reads items from the Todos table. Which policy follows the principle of least privilege?
Choose one answer Allow dynamodb:GetItem and dynamodb:Query on the Todos table's ARN. Correct. Only the actions the job uses, only on the one table it reads. Allow dynamodb:* on every resource. Not this one. That lets the job delete every table in the account. Attach AdministratorAccess. Not this one. That lets the job do anything in the account. Allow every action on the Todos table's ARN. Not this one. Right table, but it could also delete it.
Learn it: IAM policy
Question 16 In the ARN arn:aws:dynamodb:us-east-1:111122223333:table/Todos, what is 111122223333?
Choose one answer Learn it: ARN (Amazon Resource Name)
Question 17 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 18 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 19 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 20 Todo.io's app on EC2 has a role attached through an instance profile. Where does the AWS SDK get the role's credentials from?
Choose one answer Learn it: Temporary credentials · IAM role
Question 21 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 22 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 23 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 24 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 25 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 26 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 27 After Todo.io created its first RDS database, a role named AWSServiceRoleForRDS appeared. What is it?
Choose one answer A service-linked role that RDS uses to manage things like network interfaces for your databases. Correct. The service owns it: you can't change its permissions, and it only trusts RDS. A role someone created by mistake, which should be deleted. Not this one. RDS needs it. You can only delete it once RDS no longer uses it. The role the app uses to connect to the database. Not this one. The app connects with a database username and password. A role from IAM Identity Center. Not this one. Those are named AWSReservedSSO_…
Learn it: Service-linked role
Question 28 A developer can create RDS databases, but creating one with an Enhanced Monitoring role fails with AccessDenied. What is missing?
Choose one answer Learn it: iam:PassRole
Question 29 How does Todo.io's app read and write DynamoDB?
Choose one answer Learn it: DynamoDB
Question 30 Todo.io's app gets AccessDeniedException when it calls PutItem on the Todos table. What should be fixed?
Choose one answer The app's role needs a policy allowing dynamodb:PutItem on the Todos table's ARN. Correct. IAM checks every DynamoDB request, and AccessDenied means no policy allowed it. The table's security group. Not this one. DynamoDB has no security groups. The database password. Not this one. DynamoDB has no passwords; requests are signed with IAM credentials. The table is full and must be resized. Not this one. A full-table problem wouldn't be AccessDenied.
Learn it: DynamoDB · IAM policy
Question 31 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 32 A teammate asks what controls who can read objects in an S3 bucket. Which answer is right?
Choose one answer IAM policies on the caller, and the bucket policy on the bucket itself (a resource-based policy). Correct. The bucket policy names who may use the bucket. Block Public Access can override any rule that would make it public. A security group on the bucket. Not this one. Buckets have no security groups. The subnet the bucket is in. Not this one. Buckets aren't in subnets. IAM Identity Center. Not this one. Identity Center gives people roles in accounts; it doesn't set bucket permissions.
Learn it: S3 (Simple Storage Service) · IAM policy
Question 33 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 34 Someone tried to delete Todo.io's audit bucket, and IAM denied it. Does CloudTrail record the attempt?
Choose one answer Yes. CloudTrail records failed calls too, with the error. Correct. Denied attempts are often the most interesting events in an investigation. No. Only successful calls are recorded. Not this one. Failed calls are recorded too. Only if the attempt was made in the console. Not this one. Console, CLI and SDK calls are all recorded. Only if the caller used MFA. Not this one. Every call is recorded, with or without MFA.
Learn it: CloudTrail
Question 35 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 36 What does "MFA (multi-factor authentication)" mean?
Choose one answer Learn it: MFA (multi-factor authentication)
Question 37 Which term is this? "A second proof of identity, like a code from an app or a security key, on top of a password."
Choose one answer Learn it: MFA (multi-factor authentication)
Question 38 Which AWS term is described by this analogy? "A PIN on top of the key card."
Choose one answer Learn it: MFA (multi-factor authentication)
Question 39 What does "IAM (Identity and Access Management)" mean?
Choose one answer Learn it: IAM (Identity and Access Management)
Question 40 Which term is this? "Decides who can do what to which AWS resource."
Choose one answer Learn it: IAM (Identity and Access Management)
Question 41 Which AWS term is described by this analogy? "The building's security office that issues every badge."
Choose one answer Learn it: IAM (Identity and Access Management)
Question 42 What does "IAM role" mean?
Choose one answer Learn it: IAM role
Question 43 Which term is this? "An identity with permissions that something can "wear" temporarily. No password."
Choose one answer Learn it: IAM role
Question 44 Which AWS term is described by this analogy? "A visitor badge that's handed out at the door and expires."
Choose one answer Learn it: IAM role
Question 45 What does "IAM policy" mean?
Choose one answer Learn it: IAM policy
Question 46 Which term is this? "A JSON document listing allowed (or denied) actions on resources."
Choose one answer Learn it: IAM policy
Question 47 Which AWS term is described by this analogy? "The list of rooms printed on the back of a badge."
Choose one answer Learn it: IAM policy
Question 48 What does "Temporary credentials" mean?
Choose one answer Learn it: Temporary credentials
Question 49 Which term is this? "Short-lived AWS keys handed out for a role, which expire automatically."
Choose one answer Learn it: Temporary credentials
Question 50 Which AWS term is described by this analogy? "A wristband that's only valid for today."
Choose one answer Learn it: Temporary credentials
Question 51 What does "Service-linked role" mean?
Choose one answer Learn it: Service-linked role
Question 52 Which term is this? "A role an AWS service creates and owns so it can act in your account on its own behalf."
Choose one answer Learn it: Service-linked role
Question 53 Which AWS term is described by this analogy? "A contractor's own access badge, issued and controlled by the contractor's company."
Choose one answer Learn it: Service-linked role
Question 54 What does "iam:PassRole" mean?
Choose one answer Learn it: iam:PassRole
Question 55 Which term is this? "The permission to hand an existing role to an AWS service."
Choose one answer Learn it: iam:PassRole
Question 56 Which AWS term is described by this analogy? "Being allowed to lend your colleague's key card to a contractor."
Choose one answer Learn it: iam:PassRole