For developers with at least a year of hands-on experience building and maintaining AWS applications. Covers developing with AWS services and SDKs, deploying applications with CI/CD, securing code and data, and troubleshooting and optimizing applications.
Example practice questions
Topic: Securityservices: ssm, secrets-manager, s3, kms, iam, ec2concepts: encryption, secrets-management, cross-account, authentication, authorizationquestionTypes: architecture-decision, multi-step-scenario
A company is implementing an application on Amazon EC2 instances. The application needs to process incoming transactions. When the application detects a transaction that is not valid, the application must send a chat message to the company's support team. To send the message, the application needs to retrieve the access token to authenticate by using the chat API. A developer needs to implement a solution to store the access token. The access token must be encrypted at rest and in transit. The access token must also be accessible from other AWS accounts. Which solution will meet these requirements with the LEAST management overhead?
- AUse an AWS Systems Manager Parameter Store SecureString parameter that uses an AWS Key Management Service (AWS KMS) AWS managed key to store the access token. Add a resource-based policy to the parameter to allow access from other accounts. Update the IAM role of the EC2 instances with permissions to access Parameter Store. Retrieve the token from Parameter Store with the decrypt flag enabled. Use the decrypted access token to send the message to the chat.
- BEncrypt the access token by using an AWS Key Management Service (AWS KMS) customer managed key. Store the access token in an Amazon DynamoDB table. Update the IAM role of the EC2 instances with permissions to access DynamoDB and AWS KMS. Retrieve the token from DynamoDDecrypt the token by using AWS KMS on the EC2 instances. Use the decrypted access token to send the message to the chat.
- CUse AWS Secrets Manager with an AWS Key Management Service (AWS KMS) customer managed key to store the access token. Add a resource-based policy to the secret to allow access from other accounts. Update the IAM role of the EC2 instances with permissions to access Secrets Manager. Retrieve the token from Secrets Manager. Use the decrypted access token to send the message to the chat.
- DEncrypt the access token by using an AWS Key Management Service (AWS KMS) AWS managed key. Store the access token in an Amazon S3 bucket. Add a bucket policy to the S3 bucket to allow access from other accounts. Update the IAM role of the EC2 instances with permissions to access Amazon S3 and AWS KMS. Retrieve the token from the S3 bucket. Decrypt the token by using AWS KMS on the EC2 instances. Use the decrypted access token to send the massage to the chat.
Show answer
Correct answer: C
Explanation: Secrets Manager natively supports resource-based policies for cross-account access and integrates with a KMS customer managed key for encryption at rest, meeting the requirement with minimal setup. Parameter Store (A) did not support cross-account resource-based policies at the time (native cross-account parameter sharing via AWS RAM was only added in February 2024, and only for advanced-tier parameters); DynamoDB (B) and S3 (D) would require the application to manage KMS decryption itself, adding operational overhead.
Topic: Development with AWS Servicesservices: sqs, lambda, eventbridge, ec2concepts: lifecycle-management, serverless, authorizationquestionTypes: configuration, architecture-decision, multi-step-scenario
A company is running Amazon EC2 instances in multiple AWS accounts. A developer needs to implement an application that collects all the lifecycle events of the EC2 instances. The application needs to store the lifecycle events in a single Amazon Simple Queue Service (Amazon SQS) queue in the company's main AWS account for further processing. Which solution will meet these requirements?
- AConfigure Amazon EC2 to deliver the EC2 instance lifecycle events from all accounts to the Amazon EventBridge event bus of the main account. Add an EventBridge rule to the event bus of the main account that matches all EC2 instance lifecycle events. Add the SQS queue as a target of the rule.
- BUse the resource policies of the SQS queue in the main account to give each account permissions to write to that SQS queue. Add to the Amazon EventBridge event bus of each account an EventBridge rule that matches all EC2 instance lifecycle events. Add the SQS queue in the main account as a target of the rule.
- CWrite an AWS Lambda function that scans through all EC2 instances in the company accounts to detect EC2 instance lifecycle changes. Configure the Lambda function to write a notification message to the SQS queue in the main account if the function detects an EC2 instance lifecycle change. Add an Amazon EventBridge scheduled rule that invokes the Lambda function every minute.
- DConfigure the permissions on the main account event bus to receive events from all accounts. Create an Amazon EventBridge rule in each account to send all the EC2 instance lifecycle events to the main account event bus. Add an EventBridge rule to the main account event bus that matches all EC2 instance lifecycle events. Set the SQS queue as a target for the rule.
Show answer
Correct answer: D
Explanation: Configuring EC2 to deliver lifecycle events to each account's own EventBridge event bus, then forwarding matching events from each account's bus into the main account's bus (with the necessary cross-account permissions), lets a single rule and SQS target in the main account receive events from every account. Using SQS resource policies alone (B) does not get EC2 lifecycle events into EventBridge in the first place, and polling with a scheduled Lambda function (C) reinvents event-driven delivery that EventBridge already provides natively.
Topic: Troubleshooting and Optimizationservices: s3, lambda, dynamodb, iamconcepts: data-modeling, throttling-concurrency, serverlessquestionTypes: troubleshooting, multi-step-scenario
A developer has created an AWS Lambda function that is written in Python. The Lambda function reads data from objects in Amazon S3 and writes data to an Amazon DynamoDB table. The function is successfully invoked from an S3 event notification when an object is created. However, the function fails when it attempts to write to the DynamoDB table. What is the MOST likely cause of this issue?
- AThe Lambda function's concurrency limit has been exceeded.
- BDynamoDB table requires a global secondary index (GSI) to support writes.
- CThe Lambda function does not have IAM permissions to write to DynamoDB.
- DThe DynamoDB table is not running in the same Availability Zone as the Lambda function.
Show answer
Correct answer: C
Explanation: The function is triggered by S3 correctly, so invocation works; only the DynamoDB write fails, which points to the Lambda execution role lacking dynamodb:PutItem or equivalent permissions. Exceeding concurrency would cause throttling, not a write failure; tables do not need a GSI for writes; and DynamoDB is a regional service, not tied to an Availability Zone.
Topic: Deploymentservices: cloudformation, ec2concepts: iacquestionTypes: architecture-decision
A developer is creating an AWS CloudFormation template to deploy Amazon EC2 instances across multiple AWS accounts. The developer must choose the EC2 instances from a list of approved instance types. How can the developer incorporate the list of approved instance types in the CloudFormation template?
- ACreate a separate CloudFormation template for each EC2 instance type in the list.
- BIn the Resources section of the CloudFormation template, create resources for each EC2 instance type in the list.
- CIn the CloudFormation template, create a separate parameter for each EC2 instance type in the list.
- DIn the CloudFormation template, create a parameter with the list of EC2 instance types as AllowedValues.
Show answer
Correct answer: D
Explanation: Defining a CloudFormation parameter with an AllowedValues list of the approved instance types lets CloudFormation itself validate the input at stack creation time, rejecting any instance type not on the list, with one reusable template across all accounts. Separate templates or separate resources per instance type (A, B) needlessly duplicate the template for each allowed value, and a separate parameter per instance type (C) does not let the deployer simply pick one value from an approved set.
Topic: Securityservices: s3, lambda, cognito, iam, dynamodb, api-gatewayconcepts: authentication, serverlessquestionTypes: most-secure, multi-step-scenario
An application is using Amazon Cognito user pools and identity pools for secure access. A developer wants to integrate the user-specific file upload and download features in the application with Amazon S3. The developer must ensure that the files are saved and retrieved in a secure manner and that users can access only their own files. The file sizes range from 3 KB to 300 MB. Which option will meet these requirements with the HIGHEST level of security?
- AUse S3 Event Notifications to validate the file upload and download requests and update the user interface (UI).
- BSave the details of the uploaded files in a separate Amazon DynamoDB table. Filter the list of files in the user interface (UI) by comparing the current user ID with the user ID associated with the file in the table.
- CUse Amazon API Gateway and an AWS Lambda function to upload and download files. Validate each request in the Lambda function before performing the requested operation.
- DUse an IAM policy within the Amazon Cognito identity prefix to restrict users to use their own folders in Amazon S3.
Show answer
Correct answer: D
Explanation: Cognito identity pools issue temporary IAM credentials that can be scoped, via IAM policy variables like ${cognito-identity.amazonaws.com:sub}, to a folder prefix matching each user's identity ID, letting S3 enforce per-user isolation natively with no extra application logic. Options A-C require custom validation logic in event notifications, a Lambda function, or a separate DynamoDB lookup, which is less secure and adds overhead for large files.