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 cannot attach Amazon EBS volumes, so A is invalid. Lambda also cannot attach an ENA in the way described, so B is invalid. Reading the object repeatedly directly from Amazon S3 would incur repeated network I/O and higher latency. Configuring Lambda with 2 GB of ephemeral /tmp storage allows the function to download each video once and perform multiple I/O-intensive reads from fast local ephemeral storage, which is the most performance-optimized approach for files up to 2 GB.
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 the required permissions. For EC2/On-Premises deployments, the CodeDeploy service role should have the managed policy AWSCodeDeployRole attached. Using the wrong role name (A) can cause role issues but does not specifically address missing permissions. AWSCodeDeployRoleECS (B) is for ECS deployments, and the CodeDeploy agent (D) relates to agent connectivity rather than IAM role permissions.
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: A
Explanation: An Amazon Aurora database that is not publicly accessible resides in a VPC. AWS Lambda must have network connectivity into that VPC to reach the database. Amazon RDS Proxy is the recommended solution for Lambda because it provides managed connection pooling and allows Lambda to handle unpredictable traffic spikes without overwhelming the database. The other options are incorrect: a NAT gateway does not provide inbound access to a private database, making the database public is unnecessary and insecure, and attaching Lambda to a security group with no rules does not establish the required connectivity or address connection scaling.
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: B
Explanation: The requirements are ordered delivery and no duplicate messages. Amazon SQS FIFO queues provide ordering within a message group and deduplication. Option D is incorrect because although SNS supports SMS publishing, SNS FIFO topics do not support SMS endpoints for FIFO delivery semantics. Option A (Kinesis Data Firehose) is not an SMS service, and C (EventBridge Pipes) does not target phone numbers directly for SMS delivery. Although the API names in option B are inaccurate (SQS uses SendMessage, not SendMessageIn/SendMessageOut), B is the only option describing the appropriate AWS service for ordered, deduplicated messaging.
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 designed for serverless applications, extends CloudFormation with serverless resources, supports local build and testing through the AWS SAM CLI, and integrates naturally into existing AWS CodePipeline stages for automated deployments. Step Functions orchestrates workflows rather than defining infrastructure, CloudFormation alone does not provide SAM's local serverless testing capabilities, and using a standalone script does not explicitly integrate the deployment into the existing CodePipeline as required.
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: To allow an AWS Lambda function to access private resources in a VPC with the least operational overhead, attach the Lambda function to the VPC by selecting private subnets and an appropriate security group. Lambda natively supports VPC networking through Hyperplane-managed ENIs, making this the standard and simplest approach. VPN routing is unnecessary for resources already in the VPC, a VPC endpoint does not provide general VPC access for Lambda, and AWS PrivateLink is for exposing specific services rather than enabling Lambda access to arbitrary private VPC resources.
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: AWS Fargate supports Amazon EFS for persistent shared storage across multiple ECS tasks. Configure an EFS file system and reference it in the ECS task definition using efsVolumeConfiguration, then mount it into the container with mountPoints. Docker volumes are not suitable for shared persistent storage across Fargate tasks, FSx for Windows File Server is intended for Windows workloads, and EBS volumes are not the appropriate shared storage solution for multiple 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 property causes a resource replacement because the table name is an immutable property. During the stack update, CloudFormation creates a new table with the new name and, because the DeletionPolicy is the default (Delete), deletes the old table after successful replacement.
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, received messages remain hidden only for the queue's visibility timeout. If processing takes longer than the visibility timeout, the message can become visible again and be delivered a second time, causing duplicate processing. Since the third-party API can take up to 60 seconds, the SQS visibility timeout should be configured to exceed the maximum processing time (and in practice should also account for Lambda execution time). Increasing Lambda memory or timeout does not prevent SQS redelivery, and delivery delay only postpones initial delivery of new messages.
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 explicitly indicates the Lambda execution exceeded its configured timeout of about 3 seconds. Larger images take longer to move between AWS services, so increasing the Lambda function timeout resolves the issue without changing the code. Increasing concurrency or using provisioned concurrency does not extend execution time, and skipping larger images does not satisfy the requirement to process them.
$19
Get all 553 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.