QUESTION 61
A developer built an application that calls an external API to obtain data, processes the data, and saves the result to Amazon S3. The developer built a container image with all of the necessary dependencies to run the application as a container. The application runs locally and requires minimal CPU and RAM resources. The developer has created an Amazon ECS cluster. The developer needs to run the application hourly in Amazon ECS. Which solution will meet these requirements with the LEAST amount of infrastructure management overhead?
A. Add a capacity provider to manage instances.
B. Add an Amazon EC2 instance that runs the application.
C. Define a task definition with an AWS Fargate launch type.
D. Create an Amazon ECS cluster and add the managed node groups feature to run the application.
Correct Answer: C
QUESTION 62
A developer stores user data in an Amazon S3 bucket for an application. The user data must always be readily available. The application accesses new user data frequently. The application rarely queries data that is more than 3 months old. However, the application queries some important user data consistently. Both frequently accessed data and infrequently accessed data are stored separately within the S3 bucket. The developer has replicated the bucket to a second Region as part of a disaster recovery plan. The developer wants to optimize storage costs for the user data based on usage patterns. What combination of steps will meet these requirements? (Select TWO.)
A. Create an S3 Lifecycle rule to move the data to the S3 0ne Zone-Infrequent Access (S3 One Zone-IA) tier after 3 months.
B. Add a filter to the Lifecycle rule, and specify the minimum object size that the rule must apply to.
C. Create an S3 Lifecycle rule to move the data to the S3 Standard-Infrequent Access (S3 Standard-IA) tier after 3 months.
D. Create an S3 Lifecycle rule to move the data to the S3 Glacier Deep Archive tier after 3 months.
E. Add a filter to the Lifecycle rule, and specify the key prefix the rule must apply to.
Correct Answer: CE
QUESTION 63
A developer needs to modify an application architecture to meet new functional requirements. Application data is stored in Amazon DynamoDB and processed for analysis in a nightly batch. The system analysts do not want to wait until the next day to view the processed data and have asked to have it available in near-real time. Which application architecture pattern would enable the data to be processed as it is received?
A. Event driven
B. Client-server driven
C. Fan-out driven
D. Schedule driven
Correct Answer: A
QUESTION 64
A developer is building various microservices for an application that will run on Amazon EC2 instances. The developer needs to monitor the end-to-end view of the requests between the microservices and debug any issues in the various microservices. What should the developer do to accomplish these tasks?
A. Use Amazon CloudWatch to aggregate the microservices’ logs and metrics, and build the monitoring dashboard.
B. Use AWS CloudTrail to aggregate the microservices’ logs and metrics, and build the monitoring dashboard.
C. Use the AWS X-Ray SDK to add instrumentation in all the microservices, and monitor using the X-Ray service map.
D. Use AWS Health to monitor the health of all the microservices.
Correct Answer: C
QUESTION 65
A developer is working on an app for a company that uses an Amazon DynamoDB table named Orders to store customer orders. The table uses OrderID as the partition key and there is no sort key. The table contains more than 100,000 records. The developer needs to add a functionality that will retrieve all Orders records that contain an OrderSource attribute with the MobileApp value. Which solution will improve the user experience in the MOST efficient way?
A. Perform a Scan operation on the Orders table. Provide a QueryFilter condition to filter to only the items where the OrderSource attribute is equal to the MobileApp value.
B. Create a local secondary index (LSI) with OrderSource as the partition key. Perform a Query operation by using MobileApp as the key.
C. Create a global secondary index (GSI) with OrderSource as the sort key. Perform a Query operation by using MobileApp as the key.
D. Create a global secondary index (GSI) with OrderSource as the partition key. Perform a Query operation by using MobileApp as the key.
Correct Answer: D
QUESTION 66
A company is developing an application that uses an AWS Lambda function that runs every time a file is uploaded to an Amazon S3 bucket. The Lambda function needs to access third-party libraries that are stored in an Amazon S3 bucket to run successfully. The developer wants to deploy the Lambda function to multiple environments, including development, testing, and production environments. Based on the deployment stage, the application sends custom messages to the application log. The developer needs to optimize the deployment for Lambda function runtime performance. Which solution will meet these requirements?
A. Configure the Lambda function to read the third-party libraries from Amazon S3 when the function runs. Configure the environment name as an environmental variable for the Lambda function. Use the environment variable to customize application log messages.
B. Configure the Lambda function to read the third-party libraries from Amazon S3 when the function runs. Configure the environment name as a tag to for Lambda function. Use the tag value to customize application log messages.
C. Create a Lambda layer that contains the third-party libraries. Add the Lambda layer to the Lambda function. Configure the environment name as a tag for the Lambda function. Use the tag value to customize application log messages.
D. Create a Lambda layer that contains the third-party libraries. Add the Lambda layer to the Lambda function. Configure the environment name as an environment variable for the Lambda function. Use the environment variable to customize application log messages.
Correct Answer: D
QUESTION 67
A developer received the following error message during an AWS CloudFormation deployment:
DELETE_FAILED (The following resource(s) failed to delete: [ASGInstanceRole12345678].)
Which action should the developer take to resolve this error?
A. Contact AWS Support to report an issue with the Auto Scaling Groups (ASG) service.
B. Add a DependsOn attribute to the ASGInstanceRole12345678 resource in the CloudFormation template. Then delete the stack.
C. Modify the CloudFormation template to retain the ASGInstanceRole12345678 resource. Then manually delete the resource after deployment.
D. Add a force parameter when calling CloudFormation with the role-arn of ASGInstanceRole12345678.
Correct Answer: C
QUESTION 68
A company has an application that is deployed on AWS Elastic Beanstalk. The application generates user-specific PDFs and stores the PDFs in an Amazon S3 bucket. The application then uses Amazon SES to send the PDFs by email to subscribers. Users no longer access the PDFs 90 days after the PDFs are generated. The S3 bucket is not versioned and contains many obsolete PDFs. A developer must reduce the number of files in the S3 bucket by removing PDFs that are older than 90 days. Which solution will meet this requirement with the LEAST development effort?
A. Update the application code. In the code, add a rule to scan all the objects in the S3 bucket every day and to delete objects after 90 days.
B. Create an AWS Lambda function. Program the Lambda function to scan all the objects in the S3 bucket every day and to delete objects after 90 days.
C. Create an S3 Lifecycle rule for the S3 bucket to expire objects after 90 days.
D. Partition the S3 objects with a <year>/<month>/<day> key prefix. Create an AWS Lambda function to remove objects that have prefixes that have reached the expiration date.
Correct Answer: C
QUESTION 69
A company is building a microservices application that consists of many AWS Lambda functions. The development team wants to use AWS SAM templates to automatically test the Lambda functions. The development team plans to test a small percentage of traffic that is directed to new updates before the team commits to a full deployment of the application. Which combination of steps will meet these requirements in the MOST operationally efficient way? (Select TWO.)
A. Use AWS SAM CLI commands in AWS CodeDeploy to invoke the Lambda functions to test the deployment.
B. Declare the EventInvokeConfig on the Lambda functions in the AWS SAM templates with OnSuccess and OnFailure configurations.
C. Enable gradual deployments through AWS SAM templates.
D. Set the deployment preference type to Canary10Percent30Minutes. Use hooks to test the deployment.
E. Set the deployment preference type to Linear10PercentEvery10Minutes. Use hooks to test the deployment.
Correct Answer: CD
QUESTION 70
An AWS Lambda function requires read access to an Amazon S3 bucket and requires read/write access to an Amazon DynamoDB table. The correct IAM policy already exists. What is the MOST secure way to grant the Lambda function access to the S3 bucket and the DynamoDB table?
A. Attach the existing IAM policy to the Lambda function.
B. Create an IAM role for the Lambda function. Attach the existing IAM policy to the role. Attach the role to the Lambda function.
C. Create an IAM user with programmatic access. Attach the existing IAM policy to the user. Add the user access key ID and secret access key as environment variables in the Lambda function.
D. Add the AWS account root user access key ID and secret access key as encrypted environment variables in the Lambda function.
Correct Answer: B
QUESTION 71
A developer needs to build a solution in which an AWS Lambda function processes notifications from an Amazon SQS queue. Notifications for each user must be processed in the order that the notifications arrive in the queue. Notifications for different users can be processed in parallel. Which solution will meet these requirements?
A. Create a single FIFO queue. Set the FIFO queue as the event source for the Lambda function. Set the maximum concurrency of the function to the number of users. Add all notifications to the queue.
B. Create a single standard queue. Set the standard queue as the event source for the Lambda function. When a notification is added to the queue, set the MessageGroupId to be the ID of the appropriate user.
C. Create a standard queue for each user. Set each standard queue as an event source for the Lambda function. Add notifications to the appropriate queue for each user.
D. Create a single FIFO queue. Set the FIFO queue as the event source for the Lambda function. When a notification is added to the queue, set the MessageGroupId to be the ID of the appropriate user.
Correct Answer: D
QUESTION 72
A developer is working on an ecommerce application that stores data in an Amazon RDS for MySQL cluster. The developer needs to implement a caching layer for the application to retrieve information about the most viewed products. Which solution will meet these requirements?
A. Edit the RDS for MySQL cluster by adding a cache node. Configure the cache endpoint instead of the cluster endpoint in the application.
B. Create an Amazon ElastiCache (Redis OSS) cluster. Update the application code to use the ElastiCache (Redis OSS) cluster endpoint.
C. Create an Amazon DynamoDB Accelerator (DAX) cluster in front of the RDS for MySQL cluster. Configure the application to connect to the DAX endpoint instead of the RDS endpoint.
D. Configure the RDS for MySQL cluster to add a standby instance in a different Availability Zone. Configure the application to read the data from the standby instance.
Correct Answer: B
QUESTION 73
A company has an application that is based on Amazon EC2. The company provides API access to the application through Amazon API Gateway and uses Amazon DynamoDB to store the application’s data. A developer is investigating performance issues that are affecting the application. During peak usage, the application is overwhelmed by a large number of identical data read requests that come through APIs. What is the MOST operationally efficient way for the developer to improve the application’s performance?
A. Use DynamoDB Accelerator (DAX) to cache database responses.
B. Configure Amazon EC2 Auto Scaling policies to meet fluctuating demand.
C. Enable API Gateway caching to cache API responses.
D. Use Amazon ElastiCache to cache application responses.
Correct Answer: C
QUESTION 74
A company is building a serverless application on AWS. The application uses Amazon API Gateway and AWS Lambda. The company wants to deploy the application to its development, test, and production environments. Which solution will meet these requirements with the LEAST development effort?
A. Use API Gateway stage variables and create Lambda aliases to reference environment-specific resources.
B. Use Amazon ECS to deploy the application to the environments.
C. Duplicate the code for each environment. Deploy the code to a separate API Gateway stage.
D. Use AWS Elastic Beanstalk to deploy the application to the environments.
Correct Answer: A
QUESTION 75
A developer is creating an application that includes an Amazon API Gateway REST API in the us-east-2 Region. The developer wants to use Amazon CloudFront and a custom domain name for the API. The developer has acquired an SSL/TLS certificate for the domain from a third-party provider. How should the developer configure the custom domain for the application?
A. Import the SSL/TLS certificate into AWS Certificate Manager (ACM) in the same Region as the API. Create a DNS A record for the custom domain.
B. Import the SSL/TLS certificate into CloudFront. Create a DNS CNAME record for the custom domain.
C. Import the SSL/TLS certificate into AWS Certificate Manager (ACM) in the same Region as the API. Create a DNS CNAME record for the custom domain.
D. Import the SSL/TLS certificate into AWS Certificate Manager (ACM) in the us-east-1 Region. Create a DNS CNAME record for the custom domain.
Correct Answer: C
QUESTION 76
A developer is building an application that authenticates users by using an external OpenID Connect (OIDC) identity provider (IdP). The developer needs to provide users with access to objects in an Amazon S3 bucket. The developer has created an IAM role that has an attached policy to allow access to the S3 bucket. The developer needs to grant users temporary credentials to assume the IAM role through the application. Which solution will meet this requirement?
A. Call the AWS STS AssumeRole API operation with an OIDC access token to obtain temporary credentials.
B. Call the AWS STS AssumeRoleWithSAMLAPI operation with an OIDC access token to obtain temporary credentials.
C. Create an Amazon Cognito user pool by using the OIDC IdP and the IAM role. Use the user pool to obtain temporary credentials.
D. Create an Amazon Cognito identity pool by using the OIDC IdP and the IAM role. Use the identity pool to obtain temporary credentials.
Correct Answer: D
QUESTION 77
A company hosts its application in the us-west-1 Region. The company wants to add redundancy in the us-east-1 Region. The application secrets are stored in AWS Secrets Manager in us-west-1. A developer needs to replicate the secrets to us-east-1. Which solution will meet this requirement?
A. Configure secret replication for each secret. Add us-east-1 as a replication Region. Choose an AWS KMS key in us-east-1 to encrypt the replicated secrets.
B. Create a new secret in us-east-1 for each secret. Configure secret replication in us-east-1. Set the Source to be the corresponding secret in us-west-1. Choose an AWS KMS key in us-west-1 to encrypt the replicated secrets.
C. Create a replication rule for each secret. Set us-east-1 as the destination Region. Configure the rule to run during secret rotation. Choose an AWS KMS key in us-east-1 to encrypt the replicated secrets.
D. Create a Secrets Manager lifecycle rule to replicate each secret to a new Amazon S3 bucket in us-west-1 Configure an S3 replication rule to replicate the secrets to us-east-1.
Correct Answer: A
QUESTION 78
A company created an application to consume and process data. The application uses Amazon SQS and AWS Lambda functions. The application is currently working as expected, but it occasionally receives several messages that it cannot process properly. The company needs to clear these messages to prevent the queue from becoming blocked. A developer must implement a solution that makes queue processing always operational. The solution must give the company the ability to defer the messages with errors and save these messages for further analysis. What is the MOST operationally efficient solution that meets these requirements?
A. Configure Amazon CloudWatch Logs to save the error messages to a separate log stream.
B. Create a new SQS queue. Set the new queue as a dead-letter queue for the application queue. Configure the Maximum Receives setting.
C. Change the SQS queue to a FIFO queue. Configure the message retention period to 0 seconds.
D. Configure an Amazon CloudWatch alarm for Lambda function errors. Publish messages to an Amazon SNS topic to notify administrator users.
Correct Answer: B
QUESTION 79
A company has developed a new serverless application using AWS Lambda functions that will be deployed using the AWS SAM CLI. Which step should the developer complete prior to deploying the application?
A. Compress the application to a .zip file and upload it into AWS Lambda.
B. Test the new AWS Lambda function by first tracing it in AWS x-Ray.
C. Bundle the serverless application using a SAM package.
D. Create the application environment using the eb create my-env command.
Correct Answer: C
QUESTION 80
A development team uses an Amazon DynamoDB table as a database for an application. The team notices errors and slowdowns in the application during peak usage hours. The slowdowns and errors occur during a surge of user logins. The application receives frequent write requests. Application logs indicate that write requests are being throttled. The development team needs to reduce the application latency and resolve the throttling errors. Which solutions will meet these requirements? (Select TWO.)
A. Create a DynamoDB Accelerator (DAX) cluster. Update the application to send read requests to the DAX endpoint.
B. Increase the provisioned throughput of the table.
C. Reduce the frequency of write requests by using error retries and exponential backoff.
D. Reduce control plane operations that occur during peak usage hours by consolidating the DynamoDB tables and indexes.
E. Change table’s capacity mode to on-demand.
Correct Answer: BC
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.