A cloud-based video surveillance company is developing an application that analyzes video files. After the application analyzes the files, the company can discard the files.
The company stores the files in an Amazon S3 bucket. The files are 1 GB in size on average. No file is larger than 2 GB. An AWS Lambda function will run one time for each video file that is processed. The processing is very I/O intensive, and the application must read each file multiple times.
Which solution will meet these requirements in the MOST performance-optimized way?
A. Attach an Amazon Elastic Block Store (Amazon EBS) volume that is larger than 1 GB to the Lambda function. Copy the files from the S3 bucket to the EBS volume.
B. Attach an Elastic Network Adapter (ENA) to the Lambda function. Use the ENA to read the video files from the S3 bucket.
C. Increase the ephemeral storage size to 2 GB. Copy the files from the S3 bucket to the /tmp directory of the Lambda function.
D. Configure the Lambda function code to read the video files directly from the S3 bucket.
Show Answer
Correct Answer: C
Explanation: AWS Lambda supports configurable ephemeral storage (/tmp), which can be increased up to 10 GB. Copying each video file from Amazon S3 into the /tmp directory allows the function to perform repeated, I/O‑intensive reads against fast local storage instead of repeatedly fetching data over the network from S3. This minimizes latency and maximizes performance. The other options are invalid or suboptimal because Lambda cannot attach EBS volumes or ENAs, and reading directly from S3 would be slower for repeated access.
Question 22
A developer is using AWS CodeDeploy to launch an application onto Amazon EC2 instances. The application deployment fails during testing. The developer notices an IAM_ROLE_PERMISSIONS error code in Amazon CloudWatch logs.
What should the developer do to resolve the error?
A. Ensure that the deployment group is using the correct role name for the CodeDeploy service role.
B. Attach the AWSCodeDeployRoleECS policy to the CodeDeploy service role.
C. Attach the AWSCodeDeployRole policy to the CodeDeploy service role.
D. Ensure the CodeDeploy agent is installed and running on all instances in the deployment group.
Show Answer
Correct Answer: C
Explanation: The IAM_ROLE_PERMISSIONS error indicates that the IAM service role used by AWS CodeDeploy lacks required permissions. For EC2/On-Premises deployments, the CodeDeploy service role must have the managed policy AWSCodeDeployRole attached, which grants the necessary permissions for deployment operations.
Question 23
A developer is deploying a new Node.js AWS Lambda function that is not connected to a VPC. The Lambda function needs to connect to and query an Amazon Aurora database that is not publicly accessible. The developer is expecting unpredictable surges in database traffic.
What should the developer do to give the Lambda function access to the database?
A. Configure the Lambda function to use an Amazon RDS proxy.
B. Configure a NAT gateway. Attach the NAT gateway to the Lambda function.
C. Enable public access on the Aurora database. Configure a security group on the database to allow outbound access for the database engine’s port.
D. Enable VPC access for the Lambda function. Attach the Lambda function to a new security group that does not have rules.
Show Answer
Correct Answer: D
Explanation: An Amazon Aurora database that is not publicly accessible resides inside a VPC. A Lambda function that is not configured for VPC access cannot reach private VPC resources at all. Therefore, the Lambda function must be attached to the VPC (with appropriate subnets and security group) to access Aurora. An RDS Proxy can help with connection management and traffic surges, but it still requires the Lambda function to have VPC access; by itself it does not provide network connectivity.
Question 24
A developer is creating a stock trading application. The developer needs a solution to send text messages to application users to confirmation when a trade has been completed.
The solution must deliver messages in the order a user makes stock trades. The solution must not send duplicate messages.
Which solution will meet these requirements?
A. Configure the application to publish messages to an Amazon Data Firehose delivery stream. Configure the delivery stream to have a destination of each user’s mobile phone number that is passed in the trade confirmation message.
B. Create an Amazon Simple Queue Service (Amazon SQS) FIFO queue. Use the SendMessageIn API call to send the trade confirmation messages to the queue. Use the SendMessageOut API to send the messages to users by using the information provided in the trade confirmation message.
C. Configure a pipe in Amazon EventBridge Pipes. Connect the application to the pipe as a source. Configure the pipe to use each user’s mobile phone number as a target. Configure the pipe to send incoming events to the users.
D. Create an Amazon Simple Notification Service (SNS) FIFO topic. Configure the application to use the AWS SDK to publish notifications to the SNS topic to send SMS messages to the users.
Show Answer
Correct Answer: D
Explanation: The requirement is to send SMS trade confirmations with strict ordering per user and no duplicates. Amazon SNS FIFO topics provide message ordering and content-based deduplication, which meet these requirements, and SNS is the AWS service designed to send SMS messages. The other options either cannot send SMS at all (Firehose, EventBridge Pipes, SQS by itself) or lack ordering and deduplication guarantees for end-user message delivery.
Question 25
A developer needs to automate deployments for a serverless, event-based workload. The developer needs to create standardized templates to define the infrastructure and to test the functionality of the workload locally before deployment
The developer already uses a pipeline in AWS CodePipeline. The developer needs to incorporate any other infrastructure changes into the existing pipeline.
Which solution will meet these requirements?
A. Create an AWS Serverless Application Model (AWS SAM) template. Configure the pipeline stages in CodePipeline to run the necessary AWS SAM CLI commands to deploy the serverless workload.
B. Create an AWS Step Functions workflow template based on the infrastructure by using the Amazon States Language. Start the Step Functions state machine from the existing pipeline.
C. Create an AWS CloudFormation template. Use the existing pipeline workflow to build a pipeline for AWS CloudFormation stacks.
D. Create an AWS Serverless Application Model (AWS SAM) template. Use an automated script to deploy the serverless workload by using the AWS SAM CLI deploy command.
Show Answer
Correct Answer: A
Explanation: AWS SAM is purpose-built for serverless applications, providing standardized templates, local testing with the SAM CLI, and seamless deployment. Integrating SAM CLI commands into existing AWS CodePipeline stages satisfies the need for automated deployments and incorporation of infrastructure changes into the current pipeline.
Question 26
A developer is creating an AWS Lambda function that needs network access to private resources in a VPC.
Which solution will provide this access with the LEAST operational overhead?
A. Attach the Lambda function to the VPC through private subnets. Create a security group that allows network access to the private resources. Associate the security group with the Lambda function.
B. Configure the Lambda function to route traffic through a VPN connection. Create a security group that allows network access to the private resources. Associate the security group with the Lambda function.
C. Configure a VPC endpoint connection for the Lambda function. Set up the VPC endpoint to route traffic through a NAT gateway.
D. Configure an AWS PrivateLink endpoint for the private resources. Configure the Lambda function to reference the PrivateLink endpoint.
Show Answer
Correct Answer: A
Explanation: Attaching the Lambda function directly to the VPC using private subnets and an appropriate security group is the native, simplest way for Lambda to access private VPC resources. AWS manages the networking (ENIs) automatically, resulting in the least operational overhead compared to managing VPNs, NAT routing, or PrivateLink endpoints, which are unnecessary for direct access to resources within the same VPC.
Question 27
A developer is deploying an application on an Amazon Elastic Container Service (Amazon ECS) cluster that uses AWS Fargate. The developer is using a Docker container with an Ubuntu image.
The developer needs to implement a solution to store application data that is available from multiple ECS tasks. The application data must remain accessible after the container is terminated.
Which solution will meet these requirements?
A. Attach an Amazon FSx for Windows File Server volume to the container definition.
B. Specify the DockerVolumeConfiguration parameter in the ECS task definition to attach a Docker volume.
C. Create an Amazon Elastic File System (Amazon EFS) file system. Specify the mountPoints attribute and the efsVolumeConfiguration attribute in the ECS task definition.
D. Create an Amazon Elastic Block Store (Amazon EBS) volume. Specify the mount point configuration in the ECS task definition.
Show Answer
Correct Answer: C
Explanation: Amazon ECS on AWS Fargate supports persistent, shared storage only through Amazon EFS. EFS can be mounted by multiple ECS tasks concurrently and the data persists beyond the lifecycle of any container. FSx for Windows is not suitable for Linux/Ubuntu containers, Docker volumes are ephemeral in Fargate, and EBS volumes cannot be directly attached to Fargate tasks.
Question 28
A team deploys an AWS CloudFormation template to update a stack that already included an Amazon DynamoDB table. However, before the deployment of the update, the team changed the name of the DynamoDB table on the template by mistake. The DeletionPolicy attribute for all resources has the default value.
What will be the result of this mistake?
A. CloudFormation will create a new table and will delete the existing table.
B. CloudFormation will create a new table and will keep the existing table.
C. CloudFormation will overwrite the existing table and will rename the existing table.
D. CloudFormation will keep the existing table and will not create a new table.
Show Answer
Correct Answer: A
Explanation: Changing the DynamoDB table name in the CloudFormation template requires resource replacement. With the default DeletionPolicy (Delete), CloudFormation creates a new table with the new name and then deletes the existing table after the replacement succeeds.
Question 29
A developer has an application container, an AWS Lambda function, and an Amazon Simple Queue Service (Amazon SQS) queue. The Lambda function uses the SQS queue as an event source. The Lambda function makes a call to a third-party machine learning API when the function is invoked. The response from the third-party API can take up to 60 seconds to return.
The Lambda function's timeout value is currently 65 seconds. The developer has noticed that the Lambda function sometimes processes duplicate messages from the SQS queue.
What should the developer do to ensure that the Lambda function does not process duplicate messages?
A. Configure the Lambda function with a larger amount of memory.
B. Configure an increase in the Lambda function’s timeout value.
C. Configure the SQS queue’s delivery delay value to be greater than the maximum time it takes to call the third-party API.
D. Configure the SQS queue’s visibility timeout value to be greater than the maximum time it takes to call the third-party API.
Show Answer
Correct Answer: D
Explanation: When Lambda polls SQS, a message is hidden for the duration of the queue’s visibility timeout. If the function does not finish processing and delete the message before this timeout expires, the message becomes visible again and can be processed a second time, causing duplicates. Because the third-party API can take up to 60 seconds, the SQS visibility timeout must be configured to be greater than the maximum processing time to prevent the message from reappearing while the Lambda function is still running.
Question 30
A developer is building an image-processing application that includes an AWS Lambda function. The Lambda function moves images from one AWS service to another AWS service for image processing. For images that are larger than 2 MB, the Lambda function returns the following error: “Task timed out after 3.01 seconds.”
The developer needs to resolve the error without modifying the Lambda function code.
Which solution will meet these requirements?
A. Increase the Lambda function’s timeout value.
B. Configure the Lambda function to not move images that are larger than 2 M
C. Request a concurrency quota increase for the Lambda function.
D. Configure provisioned concurrency for the Lambda function.
Show Answer
Correct Answer: A
Explanation: The error message explicitly indicates that the Lambda execution exceeded its configured timeout (about 3 seconds). Larger images take longer to transfer between services, causing the timeout. Increasing the Lambda function’s timeout allows more execution time without changing the code. Concurrency settings do not affect execution duration, and avoiding large images does not resolve the underlying issue.
$19
Get all 555 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.