QUESTION 41
A developer is building a serverless application by using AWS SAM on multiple AWS Lambda functions. When the application is deployed, the developer wants to shift 10% of the traffic to the new deployment of the application for the first 10 minutes after deployment. If there are no issues, all traffic must switch over to the new version. Which change to the AWS SAM template will meet these requirements?
A. Set the Deployment Preference Type to Canary10Percent1O0Minutes. Set the AutoPublishAlias property to the Lambda alias.
B. Set the Deployment Preference Type to Linear10PercentEvery10Minutes. Set AutoPublishAlias property to the Lambda alias.
C. Set the Deployment Preference Type to Canary10Percent10Minutes. Set the preTraffic and PostTraffic properties to the Lambda alias.
D. Set the Deployment Preference Type to Linear10PercentEvery10Minutes. Set PreTraffic and PostTraffic properties to the Lambda alias.
Correct Answer: A
QUESTION 42
A company hosts a multitenancy application that is becoming more popular. The company is setting up an Amazon CloudFront distribution for the application. When the company begins to test the CloudFront distribution, some tenants see incorrect images for the tenant. The company needs to configure the application to cache the correct image for each tenant. Which solution will meet this requirement with the LEAST development effort?
A. Configure the application to send a custom header named TenantlD that includes a unique tenant identifier with each HTTP request. Configure CloudFront to cache images based on the request header.
B. Create a new database table that maps images to tenant IDs. Configure the application to serve image names based on the requested tenant ID.
C. Configure the application to send a cookie header that includes a unique tenant identifier with each HTTP request. Configure CloudFront to cache images based on the request header.
D. Write a Lambda@Edge function to look up and rewrite image paths based on each tenant. Integrate the Lambda@Edge function into the CloudFront configuration.
Correct Answer: A
QUESTION 43
A company runs applications on Amazon EKS containers. The company sends application logs from the containers to an Amazon CloudWatch Logs log group. The company needs to process log data in real time based on a specific error in the application logs. Which combination of steps will meet these requirements? (Select TWO.)
A. Create an Amazon SNS topic that has a subscription filter policy.
B. Create a subscription filter on the log group that has a filter pattern.
C. Set up an Amazon CloudWatch agent operator to manage the trace collection daemon in Amazon EKS.
D. Create an AWS Lambda function to process the logs.
E. Create an Amazon EventBridge rule to invoke the AWS Lambda function on a schedule.
Correct Answer: BD
QUESTION 44
A developer is creating a serverless application that uses an AWS Lambda function. The developer will use AWS CloudFormation to deploy the application. The application will write logs to Amazon CloudWatch Logs. The developer has created a log group in a CloudFormation template for the application to use. The developer needs to modify the CloudFormation template to make the name of the log group available to the application at runtime. Which solution will meet this requirement?
A. Use the AWS::Include transform in CloudFormation to provide the log group’s name to the application.
B. Pass the log group’s name to the application in the user data section of the CloudFormation template.
C. Use the CloudFormation template’s Mappings section to specify the log group’s name for the application.
D. Pass the log group’s Amazon Resource Name (ARN) as an environment variable to the Lambda function.
Correct Answer: D
QUESTION 45
A company has a serverless application that uses an Amazon API Gateway API to invoke an AWS Lambda function. A developer creates a fix for a defect in the Lambda function code. The developer wants to deploy this fix to the production environment. To test the changes, the developer needs to send 10% of the live production traffic to the updated Lambda function version. Which combination of steps will meet these requirements? (Select TWO.)
A. Publish a new version of the Lambda function that contains the updated code.
B. Set up a new stage in API Gateway with a new Lambda function version. Enable weighted routing in API Gateway stages.
C. Create an alias for the Lambda function. Configure weighted routing on the alias. Specify a 10% weight for the new Lambda function version.
D. Set up a routing policy on a Network Load Balancer. Configure 10% of the traffic to go to the new Lambda function version.
E. Set up a weighted routing policy by using Amazon Route 53. Configure 10% of the traffic to go to the new Lambda function version.
Correct Answer: AC
QUESTION 46
A company had an Amazon RDS for MySQL DB instance that was named mysql-db. The DB instance was deleted within the past 90 days. A developer needs to find which IAM user or role deleted the DB instance in the AWS environment. Which solution will provide this information?
A. Retrieve the AWS CloudTrail events for the resource mysql-db where the event name is DeleteDBInstance. Inspect each event.
B. Retrieve the Amazon CloudWatch log events from the most recent log stream within the rds/mysql-db log group. Inspect the log events.
C. Retrieve the AWS X-Ray trace summaries. Filter by services with the name mysql-db. Inspect the ErrorRootCauses values within each summary.
D. Retrieve the AWS Systems Manager deletions inventory. Filter the inventory by deletions that have a TypeName value of RDS. Inspect the deletion details.
Correct Answer: A
QUESTION 47
A company uses an AWS Lambda function to call a third-party service. The third-party service has a limit of requests each minute. If the number of requests exceeds the limit, the third-party service returns rate-limiting errors. A developer needs to configure the Lambda function to avoid receiving rate limiting errors from the third-party service. Which solution will meet these requirements?
A. Set the reserved concurrency on the Lambda function to match the number of concurrent requests that the third-party service allows.
B. Decrease the memory that is allocated to the Lambda function.
C. Set the provisioned concurrency on the Lambda function to match the number of concurrent requests that the third-party service allows.
D. Increase the timeout value that is specified on the Lambda function.
Correct Answer: A
QUESTION 48
A developer is migrating a containerized application from an on-premises environment to the AWS Cloud. The developer is using the AWS CDK to provision a container in Amazon ECS on AWS Fargate. The container is behind an Application Load Balancer (ALB). When the developer deploys the stack, the deployment fails because the ALB fails health
checks. The developer needs to resolve the failed health checks. Which solutions will meet this requirement? (Select TWO.)
A. Confirm that the capacity providers for the container have been provisioned and are properly sized.
B. Confirm that the target group port matches the port mappings in the ECS task definition.
C. Confirm that a hosted zone associated with the ALB matches a hosted zone that is referenced in the ECS task definition.
D. Confirm that the ALB listener on the mapped port has a default action that redirects to the application’s health check path endpoint.
E. Confirm that the ALB listener on the mapped port has a default action that forwards to the correct target group.
Correct Answer: BE
QUESTION 49
A company is building an application for stock trading. The application needs sub-millisecond latency for processing trade requests. The company uses Amazon DynamoDB to store all the trading data that is used to process each trading request. A development team performs load testing on the application and finds that the data retrieval time is higher than expected. The development team needs a solution that reduces the data retrieval time with the least possible effort. Which solution meets these requirements?
A. Add local secondary indexes (LSIs) for the trading data.
B. Store the trading data in Amazon S3, and use S3 Transfer Acceleration.
C. Add retries with exponential backoff for DynamoDB queries.
D. Use DynamoDB Accelerator (DAX) to cache the trading data.
Correct Answer: D
QUESTION 50
A developer is using AWS CodeDeploy to automate a company’s application deployments to Amazon EC2. Which application specification file properties are required to ensure the software deployments do not fail? (Select TWO.)
A. The file must be a JSON-formatted file named appspec.json.
B. The file must be a YAML-formatted file named appspec.yml.
C. The file must be stored in AWS CodeBuild and referenced from the application’s source code.
D. The file must be placed in the root of the directory structure of the application’s source code.
E. The file must be stored in Amazon S3 and referenced from the application’s source code.
Correct Answer: BD
QUESTION 51
A company deploys a new application to AWS. The company is streaming application logs to Amazon CloudWatch Logs. The company’s development team must receive notification by email when the word “ERROR” appears in any log lines. A developer sets up an Amazon SNS topic and subscribes the development team to the topic. What should the developer do next to meet the requirements?
A. Select the appropriate log group. Create a CloudWatch metric filter with “ERROR” as the search term. Create an alarm on this metric that notifies the SNS topic when the metric is 1 or higher.
B. In CloudWatch Logs Insights, select the appropriate log group. Create a metric query to search for the term “ERROR” in the logs. Create an alarm on this metric that notifies the SNS topic when the metric is 1 or higher.
C. Select the appropriate log group. Create an SNS subscription filter with “ERROR” as the filter pattern. Select the SNS topic as the destination.
D. Create a CloudWatch alarm that includes “ERROR” as a filter pattern, a log group dimension that defines the appropriate log group, and a destination that notifies the SNS topic.
Correct Answer: A
QUESTION 52
A developer is receiving an intermittent ProvisionedThroughputExceededException error from an application that is based on Amazon DynamoDB. According to the Amazon CloudWatch metrics for the table, the application is not exceeding the provisioned throughput. What could be the cause of the issue?
A. The DynamoDB table storage size is larger than the provisioned size.
B. The application is exceeding capacity on a particular hash key.
C. The DynamoDB table is exceeding the provisioned scaling operations.
D. The application is exceeding capacity on a particular sort key.
Correct Answer: B
QUESTION 53
A developer wants to use an AWS AppSync API to invoke AWS Lambda functions to return data. Some of the Lambda functions perform long-running processes. The AWS AppSync API needs to return responses immediately. Which solution will meet these requirements with the LEAST operational overhead?
A. Configure the Lambda functions to be AWS AppSync data sources. Use Event mode for asynchronous Lambda invocation.
B. Increase the timeout setting for the Lambda functions to accommodate longer processing times.
C. Set up an Amazon SQS queue. Configure AWS AppSync to send messages to the SQS queue. Configure a Lambda function event source mapping to poll the queue.
D. Enable caching, and increase the duration of the AWS AppSync cache TTL.
Correct Answer: D
QUESTION 54
A developer is building an application that uses an AWS Lambda function to process data. The application requires minimum latency. The Lambda function must have predictable function start times. All setup activities for the execution environment must happen before invocation of the Lambda function. Which solution will meet these requirements?
A. Increase the memory of the Lambda function to the maximum amount. Configure an Amazon EventBridge rule to schedule invocations of the Lambda function every minute to keep the execution environment active.
B. Optimize the static initialization code that runs when a new execution environment is prepared for the first time. Decrease and compress the size of the Lambda function package and the imported libraries and dependencies.
C. Increase the reserved concurrency of the Lambda function to the maximum value for unreserved account concurrency. Run any setup activities manually before the initial invocation of the Lambda function.
D. Publish a new version of the Lambda function. Configure provisioned concurrency for the Lambda function with the required minimum number of execution environments.
Correct Answer: D
QUESTION 55
A company has an application that uses an Amazon S3 bucket for object storage. A developer needs to configure in-transit encryption for the S3 bucket. All the S3 objects containing personal data needs to be encrypted at rest with AWS KMS keys, which can be rotated on demand. Which combination of steps will meet these requirements? (Select TWO.)
A. Write an S3 bucket policy to allow only encrypted connections over HTTPS by using permissions boundary.
B. Configure an S3 bucket policy to enable client-side encryption for the objects containing personal data by using an AWS KMS customer managed key
C. Configure the application to encrypt the objects by using an AWS KMS customer managed key before uploading the objects containing personal data to Amazon S3.
D. Write an S3 bucket policy to allow only encrypted connections over HTTPS by using the aws:SecureTransport condition.
E. Configure S3 Block Public Access settings for the S3 bucket to allow only encrypted connections over HTTPS.
Correct Answer: CD
QUESTION 56
An ecommerce startup is preparing for an annual sales event. As the traffic to the company’s application increases, the development team wants to be notified when the Amazon EC2 instance’s CPU utilization exceeds 80%. Which solution will meet this requirement?
A. Create a custom Amazon CloudWatch alarm that sends a notification to an Amazon SNS topic when the CPU utilization exceeds 80%.
B. Create a custom AWS CloudTrail alarm that sends a notification to an Amazon SNS topic when the CPU utilization exceeds 80%.
C. Create a cron job on the EC2 instance that invokes the –describe-instance-information command on the host instance every 15 minutes and sends the results to an Amazon SNS topic.
D. Create an AWS Lambda function that queries the AWS CloudTrail logs for the CPU Utilization metric every 15 minutes and sends a notification to an Amazon SNS topic when the CPU utilization exceeds 80%.
Correct Answer: A
QUESTION 57
A developer is modifying an AWS Lambda function that accesses an Amazon RDS for MySQL database. The developer discovers that the Lambda function has the database credentials stored as plaintext in the Lambda function code. The developer must implement a solution to make the credentials more secure. The solution must include automated credential rotation every 30 days. Which solution will meet these requirements?
A. Move the credentials to a secret in AWS Secrets Manager. Modify the Lambda function to read from Secrets Manager. Set a schedule to rotate the secret every 30 days.
B. Move the credentials to a secure string parameter in Aws Systems Manager Parameter Store. Modify the Lambda function to read from Parameter Store. Set a schedule to rotate the parameter every 30 days.
C. Move the credentials to an encrypted Amazon S3 bucket. Modify the Lambda function to read from the S3 bucket. Configure S3 Object Lambda to rotate the credentials every 30 days.
D. Move the credentials to a secure string parameter in Aws Systems Manager Parameter Store. Create an Amazon EventBridge rule to rotate the parameter every 30 days.
Correct Answer: A
QUESTION 58
A company hosts the frontend of an application on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer (ALB). The company configured the Auto Scaling group to scale based on CPUJ usage. The instances use an Amazon RDS database for persistent data storage. The capacity of the EC2 instances is sufficient, and network latency is low. However, users report slow response times and delays in notifications during traffic surges. The company needs to improve application performance. The company wants a solution that does not require advanced features or significant changes to the application architecture. Which solution will meet these requirements with the LEAST configuration effort?
A. Use Amazon ElastiCache (Memcached) to cache frequently accessed data.
B. Implement dynamic scaling by using a target tracking scaling policy based on a predefined ALBRequestCountPerTarget metric type.
C. Migrate the database to Amazon DynamoDB. Create a DynamoDB Accelerator (DAX).
D. Use Amazon ElastiCache (Redis OSS) to cache frequently accessed data.
Correct Answer: A
QUESTION 59
A company is preparing to migrate an application to the company’s first AWS environment. Before this migration, a developer is creating a proof-of-concept application to validate a model for building and deploying container-based applications on AWS. Which combination of steps should the developer take to deploy the containerized proof-of-concept application with the LEAST operational effort? (Select TWO.)
A. Package the application into a .zip file by using a command line tool. Upload the package to Amazon S3.
B. Package the application into a container image by using the Docker CLI. Upload the image to Amazon ECR.
C. Deploy the application to an Amazon EC2 instance by using AWS CodeDeploy.
D. Deploy the application to Amazon EKS on AWS Faraate
E. Deploy the application to Amazon ECS on AWS Fargate.
Correct Answer: BE
QUESTION 60
A company is concerned that a malicious user could deploy unauthorized changes to the code for an AWS Lambda function. What can a developer do to ensure that only trusted code is deployed to Lambda?
A. Turn on the trusted code option in AWS CodeDeploy. Add the CodeDeploy digital certificate to the Lambda package before deploying the package to Lambda.
B. Define the code signing configuration in the Lambda console. Use AWS Signer to digitally sign the Lambda package before deploying the package to Lambda.
C. Link Lambda to AWS KMS in the Lambda console. Use AWS KMS to digitally sign the Lambda package before deploying the package to Lambda.
D. Set the KmsKeyArn property of the Lambda function to the Amazon Resource Name (ARN) of a trusted key before deploying the package to Lambda.
Correct Answer: B
We use cookies to improve your experience, including essential cookies required for the website to function. By continuing, you agree to our use of cookies. Learn more.
We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.
Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.
Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.