A gaming website gives users the ability to trade game items with each other on the platform. The platform requires both users' records to be updated and persisted in one transaction. If any update fails, the transaction must roll back.
Which AWS solution can provide the transactional capability that is required for this feature?
AAmazon DynamoDB with operations made with the Consistent Read parameter set to true
BAmazon ElastiCache for Memcached with operations made within a transaction block
CAmazon DynamoDB with reads and writes made by using Transact* operations
DAmazon Aurora MySQL with operations made within a transaction block
EAmazon Athena with operations made within a transaction block
A company hosts a three-tier web application on AWS behind an Amazon CloudFront distribution. A developer wants a dashboard to monitor error rates and anomalies of the CloudFront distribution with the shortest possible refresh interval.
Which combination of slops should the developer take to meet these requirements? (Choose two.)
AActivate real-time logs on the CloudFront distribution. Create a stream in Amazon Kinesis Data Streams.
BExport the CloudFront logs to an Amazon S3 bucket. Detect anomalies and error rates with Amazon QuickSight.
CConfigure Amazon Kinesis Data Streams to deliver logs to Amazon OpenSearch Service (Amazon Elasticsearch Service). Create a dashboard in OpenSearch Dashboards (Kibana).
DCreate Amazon CloudWatch alarms based on expected values of selected CloudWatch metrics to detect anomalies and errors.
EDesign an Amazon CloudWatch dashboard of the selected CloudFront distribution metrics.
A company has an online order website that uses Amazon DynamoDB to store item inventory. A sample of the inventory object is as follows:
A developer needs to reduce all inventory prices by 100 as long as the resulting price would not be less than 500.
What should the developer do to make this change with the LEAST number of calls to DynamoDB?
APerform a DynamoDB Query operation with the Id. If the price is >= 600, perform an UpdateItem operation to update the price.
BPerform a DynamoDB UpdateItem operation with a condition expression of "Price >= 600".
CPerform a DynamoDB UpdateItem operation with a condition expression of "ProductCategory IN ({"S": "Sporting Goods"}) and Price 600".
DPerform a DynamoDB UpdateItem operation with a condition expression of "MIN Price = 500".
A company is using an AWS Lambda function to process records from an Amazon Kinesis data stream. The company recently observed slow processing of the records. A developer notices that the iterator age metric for the function is increasing and that the Lambda run duration is constantly above normal.
Which actions should the developer take to increase the processing speed? (Choose two.)
AIncrease the number of shards of the Kinesis data stream.
BDecrease the timeout of the Lambda function.
CIncrease the memory that is allocated to the Lambda function.
DDecrease the number of shards of the Kinesis data stream.
EIncrease the timeout of the Lambda function.
A developer is making changes to a custom application that uses AWS Elastic Beanstalk.
Which solutions will update the Elastic Beanstalk environment with the new application version after the developer completes the changes? (Choose two.)
APackage the application code into a .zip file. Use the AWS Management Console to upload the zip file and deploy the packaged application.
BPackage the application code into a .tar file. Use the AWS Management Console to create a new application version from the .tar file. Update the environment by using the AWS CLI.
CPackage the application code into a .tar file. Use the AWS Management Console to upload the .tar file and deploy the packaged application.
DPackage the application code into a .zip file. Use the AWS CLI to create a new application version from the .zip file and to update the environment.
EPackage the application code into a .zip file. Use the AWS Management Console to create a new application version from the .zip file. Rebuild the environment by using the AWS CLI.
A company has an application where reading objects from Amazon S3 is based on the type of user. The user types are registered user and guest user. The company has 25,000 users and is growing. Information is pulled from an S3 bucket depending on the user type.
Which approaches are recommended to provide access to both user types? (Choose two.)
AProvide a different access key and secret access key in the application code for registered users and guest users to provide read access to the objects.
BUse S3 bucket policies to restrict read access to specific IAM users.
CUse Amazon Cognito to provide access using authenticated and unauthenticated roles.
DCreate a new IAM user for each user and grant read access.
EUse the AWS IAM service and let the application assume the different roles using the AWS Security Token Service (AWS STS) AssumeRole action depending on the type of user and provide read access to Amazon S3 using the assumed role.
A developer is writing an application to analyze the traffic to a fleet of Amazon EC2 instances. The EC2 instances run behind a public Application Load Balancer
(ALB). An HTTP server runs on each of the EC2 instances, logging all requests to a log file.
The developer wants to capture the client public IP addresses. The developer analyzes the log files and notices only the IP address of the ALB.
What must the developer do to capture the client public IP addresses in the log file?
AAdd a Host header to the HTTP server log configuration file.
BInstall the Amazon CloudWatch Logs agent on each EC2 instance. Configure the agent to write to the log file.
CInstall the AWS X-Ray daemon on each EC2 instance. Configure the daemon to write to the log file.
DAdd an X-Forwarded-For header to the HTTP server log configuration file.
A developer is writing a new AWS Serverless Application Model (AWS SAM) template with a new AWS Lambda function. The Lambda function runs complex code. The developer wants to test the Lambda function with more CPU power.
What should the developer do to meet this requirement?
AIncrease the runtime engine version.
BIncrease the timeout.
CIncrease the number of Lambda layers.
DIncrease the memory.
A developer uses a single AWS CloudFormation template to configure the test environment and the production environment for an application. The developer handles environment-specific requirements in the CloudFormation template.
The developer decides to update the Amazon EC2 Auto Scaling launch template with new Amazon Machine Images (AMIs) for each environment. The
CloudFormation update for the new AMIs is successful in the test environment, but the update fails in the production environment.
What are the possible causes of the CloudFormation update failure in the production environment? (Choose two.)
AThe new AMIs do not fulfill the specified conditions in the CloudFormation template.
BThe service quota for the number of EC2 vCPUs in the AWS Region has been exceeded.
CThe security group that is specified in the CloudFormation template does not exist.
DCloudFormation does not recognize the template change as an update.
ECloudFormation does not have sufficient IAM permissions to make the changes.
A developer is creating a serverless web application and maintains different branches of code. The developer wants to avoid updating the Amazon API Gateway target endpoint each time a new code push is performed.
What solution would allow the developer to perform a code push efficiently, without the need to update the API Gateway?
AAssociate different AWS Lambda functions to an API Gateway target endpoint.
BCreate different stages in API Gateway. then associate API Gateway with AWS Lambda.
CCreate aliases and versions in AWS Lambda.
DTag the AWS Lambda functions with different names.
A developer needs to deploy an application running on AWS Fargate using Amazon ECS. The application has environment variables that must be passed to a container for the application to initialize.
How should the environment variables be passed to the container?
ADefine an array that includes the environment variables under the environment parameter within the service definition.
BDefine an array that includes the environment variables under the environment parameter within the task definition.
CDefine an array that includes the environment variables under the entryPoint parameter within the task definition.
DDefine an array that includes the environment variables under the entryPoint parameter within the service definition.
A developer must extend an existing application that is based on the AWS Serverless Application Model (AWS SAM). The developer has used the AWS SAM CLI to create the project. The project contains different AWS Lambda functions.
Which combination of commands must the developer use to redeploy the AWS SAM application? (Choose two.)
Asam init
Bsam validate
Csam build
Dsam deploy
Esam publish
A developer creates a customer managed key for multiple AWS users to encrypt data in Amazon S3. The developer configures Amazon Simple Notification
Service (Amazon SNS) to publish a message if key deletion is scheduled. The developer needs to preserve any SNS messages that cannot be delivered so that those messages can be reprocessed.
Which AWS service or feature should the developer use to meet this requirement?
AAmazon Simple Email Service (Amazon SES)
BAWS Lambda
CAmazon Simple Queue Service (Amazon SQS)
DAmazon CloudWatch alarm
A developer manages an application that interacts with Amazon RDS. After observing slow performance with read queries, the developer implements Amazon
ElastiCache to update the cache immediately following the primary database update.
What will be the result of this approach to caching?
ACaching will increase the load on the database instance because the cache is updated for every database update.
BCaching will slow performance of the read queries because the cache is updated when the cache cannot find the requested data.
CThe cache will become large and expensive because the infrequently requested data is also written to the cache.
DOverhead will be added to the initial response time because the cache is updated only after a cache miss.
A developer has a stateful web server on-premises that is being migrated to AWS. The developer must have greater elasticity in the new design.
How should the developer re-factor the application to make it more elastic? (Choose two.)
AUse pessimistic concurrency on Amazon DynamoDB.
BUse Amazon CloudFront with an Auto Scaling group.
CUse Amazon CloudFront with an AWS Web Application Firewall.
DStore session state data in an Amazon DynamoDB table.
EUse an ELB with an Auto Scaling group.
A developer has a legacy application that is hosted on-premises. Other applications hosted on AWS depend on the on-premises application for proper functioning.
In case of any application errors, the developer wants to be able to use Amazon CloudWatch to monitor and troubleshoot all applications from one place.
How can the developer accomplish this?
AInstall an AWS SDK on the on-premises server to automatically send logs to CloudWatch.
BDownload the CloudWatch agent to the on-premises server. Configure the agent to use IAM user credentials with permissions for CloudWatch.
CUpload log files from the on-premises server to Amazon S3 and have CloudWatch read the files.
DUpload log files from the on-premises server to an Amazon EC2 instance and have the instance forward the logs to CloudWatch.
A developer is designing a serverless application with two AWS Lambda functions to process photos. One Lambda function stores objects in an Amazon S3 bucket and stores the associated metadata in an Amazon DynamoDB table. The other Lambda function fetches the objects from the S3 bucket by using the metadata from the DynamoDB table. Both Lambda functions use the same Python library to perform complex computations and are approaching the quota for the maximum size of zipped deployment packages.
What should the developer do to reduce the size of the Lambda deployment packages with the LEAST operational overhead?
APackage each Python library in its own .zip file archive. Deploy each Lambda function with its own copy of the library.
BCreate a Lambda layer with the required Python library. Use the Lambda layer in both Lambda functions.
CCombine the two Lambda functions into one Lambda function. Deploy the Lambda function as a single .zip file archive.
DDownload the Python library to an S3 bucket. Program the Lambda functions to reference the object URLs.
A developer is adding a feature to a client-side application so that users can upload videos to an Amazon S3 bucket.
What is the MOST secure way to give the application the ability to write files to the S3 bucket?
AUpdate the S3 bucket policy to allow public write access. Allow any user to upload videos by removing the need to handle user authentication within the client- side application.
BCreate a new IAM policy and a corresponding IAM user with permissions to write to the S3 bucket. Store the key and the secret for the user in the application code. Use the key to authenticate the video uploads.
CConfigure the API layer of the application to have a new endpoint that creates signed URLs that allow an object to be put into the S3 bucket. Generate a presigned URL through this API call in the client application. Upload the video by using the signed URL.
DGenerate a new IAM key and a corresponding secret by using the AWS account root user credentials. Store the key and the secret for the user in the application code. Use the key to authenticate the video uploads.
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?
AAdd local secondary indexes (LSIs) for the trading data.
BStore the trading data in Amazon S3, and use S3 Transfer Acceleration.
CAdd retries with exponential backoff for DynamoDB queries.
DUse DynamoDB Accelerator (DAX) to cache the trading data.
A developer needs to build and deploy a serverless application that has an API that mobile clients will use. The API will use Amazon DynamoDB and Amazon
OpenSearch Service (Amazon Elasticsearch Service) as data sources. Responses that are sent to the clients will contain aggregated data from both data sources.
The developer must minimize the number of API endpoints and must minimize the number of API calls that are required to retrieve the necessary data.
Which solution should the developer use to meet these requirements?
AGraphQL API on AWS AppSync
BREST API on Amazon API Gateway
CGraphQL API on an Amazon EC2 instance
DREST API on AWS Elastic Beanstalk
A Lambda function processes data before sending it to a downstream service. Each piece of data is approximately 1MB in size. After a security audit, the function is now required to encrypt the data before sending it downstream.
Which API call is required to perform the encryption?
APass the data to the KMS ReEncrypt API for encryption.
BUse the KMS GenerateDataKey API to get an encryption key.
CUse the KMS GenerateDataKeyWithoutPlainText API to get an encryption key.
DPass the data to KMS as part of the Encrypt API for encryption.
A company has a web application that runs on Amazon EC2 instances with a custom Amazon Machine Image (AMI). The company uses AWS CloudFormation to provision the application. The application runs in the us-east-1 Region, and the company needs to deploy the application to the us-west-1 Region.
An attempt to create the AWS CloudFormation stack in us-west-1 fails. An error message states that the AMI ID does not exist. A developer must resolve this error with a solution that uses the least amount of operational overhead.
Which solution meets these requirements?
AChange the AWS CloudFormation templates for us-east-1 and us-west-1 to use an AWS AMI. Relaunch the stack for both Regions.
BCopy the custom AMI from us-east-1 to us-west-1. Update the AWS CloudFormation template for us-west-1 to refer to AMI ID for the copied AMI. Relaunch the stack.
CBuild the custom AMI in us-west-1. Create a new AWS CloudFormation template to launch the stack in us-west-1 with the new AMI ID.
DManually deploy the application outside AWS CloudFormation in us-west-1.
A developer wants to run a PHP website with an NGINX proxy and package them as Docker containers in one environment. The developer wants a managed environment with automated provisioning and load balancing. The developer cannot change the configuration and must minimize operational overhead.
How should the developer build the website to meet these requirements?
ACreate a new application in AWS Elastic Beanstalk that is preconfigured for a multicontainer Docker environment. Upload the code, and deploy it to a web server environment.
BDeploy the code on Amazon EC2 instances in an Auto Scaling group behind an Application Load Balancer.
CConstruct an AWS CloudFormation template that launches Amazon EC2 instances. Install and configure the PHP code by using cfn helper scripts.
DUpload the code for the PHP website into an Amazon S3 bucket. Host the website from the S3 bucket.
A developer needs to deploy an application to AWS Elastic Beanstalk for a company. The application consists of a single Docker image. The company's automated continuous integration and continuous delivery (CI/CD) process builds the Docker image and pushes the image to a public Docker registry.
How should the developer deploy the application to Elastic Beanstalk?
ACreate a Dockerfile. Configure Elastic Beanstalk to build the application as a Docker image.
BCreate a docker-compose.yml file. Use the Elastic Beanstalk CLI to deploy the application.
CCreate a .zip file that contains the Docker image. Upload the .zip file to Elastic Beanstalk.
DCreate a Dockerfile. Run the Elastic Beanstalk CLI eb local run command in the same directory.
A company has a website that displays a daily newsletter. When a user visits the website, an AWS Lambda function processes the browser's request and queries the company's on-premises database to obtain the current newsletter. The newsletters are stored in English. The Lambda function uses the Amazon Translate
TranslateText API operation to translate the newsletters, and the translation is displayed to the user.
Due to an increase in popularity, the website's response time has slowed. The database is overloaded. The company cannot change the database and needs a solution that improves the response time of the Lambda function.
Which solution meets these requirements?
AChange to asynchronous Lambda function invocation.
BCache the translated newsletters in the Lambda /tmp directory.
CEnable TranslateText API caching.
DChange the Lambda function to use parallel processing.