001-020 Flashcards

1
Q

1

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?

A. Amazon DynamoDB with operations made with the Consistent Read parameter set to true

B. Amazon ElastiCache for Memcached with operations made within a transaction block

C. Amazon DynamoDB with reads and writes made by using Transact* operations

D. Amazon Aurora MySQL with operations made within a transaction block

E. Amazon Athena with operations made within a transaction block

A

C.Amazon DynamoDB with reads and writes made by using Transact* operations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

2

A developer has created a Java application that makes HTTP requests directly to AWS services. Application logging shows 5xx HTTP response codes that occur at irregular intervals. The errors are affecting users. How should the developer update the application to improve the application’s resiliency?

A. Revise the request content in the application code.

B. Use the AWS SDK for Java to interact with AWS APIs.

C. Scale out the application so that more instances of the application are running.

D. Add additional logging to the application code.

A

B.Use the AWS SDK for Java to interact with AWS APIs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

3

A global company has a mobile app with static data stored in an Amazon S3 bucket in the us-east-1 Region. The company serves the content through an Amazon CloudFront distribution. The company is launching the mobile app in South Africa. The data must reside in the af-south-1 Region. The company does not want to deploy a specific mobile client for South Africa. What should the company do to meet these requirements?

A. Use the CloudFront geographic restriction feature to block access to users in South Africa.

B. Create a Lambda@Edge function. Associate the Lambda@Edge function as an origin request trigger with the CloudFront distribution to change the S3 origin Region.

C. Create a Lambda@Edge function. Associate the Lambda@Edge function as a viewer response trigger with the CloudFront distribution to change the S3 origin Region.

D. Include af-south-1 in the alternate domain name (CNAME) of the CloudFront distribution.

A

B. Create a Lambda@Edge function. Associate the Lambda@Edge function as an origin request trigger with the CloudFront distribution to change the S3 origin Region.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

4

A developer is testing an AWS Lambda function by using the AWS Serverless Application Model (AWS SAM) local CLI. The application that is implemented by the Lambda function makes several AWS API calls by using the AWS software development kit (SDK). The developer wants to allow the function to make AWS API calls in a test AWS account from the developer’s laptop.
What should the developer do to meet these requirements?

A.Edit the template.yml file. Add the AWS_ACCESS_KEY_ID property and the AWS_SECRET_ACCESS_KEY property in the Globals section.

B.Add a test profile by using the aws configure command with the –profile option. Run AWS SAM by using the sam local invoke command with the -profile option.

C.Edit the template.yml tile. For the AWS::Serverless::Function resource, set the role to an IAM role in the AWS account.

D.Run the function by using the sam local invoke command. Override the AWS_ACCESS_KEY_ID parameter and the AWS_SECRET_ACCESS_KEY parameter by specifying the –parameter-overrides option.

A

B.Add a test profile by using the aws configure command with the –profile option. Run AWS SAM by using the sam local invoke command with the -profile option.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

5

A developer designed an application on an Amazon EC2 instance. The application makes API requests to objects in an Amazon S3 bucket. Which combination of steps will ensure that the application makes the API requests in the MOST secure manner? (Choose two.)

A.Create an IAM user that has permissions to the S3 bucket. Add the user to an IAM group.
B.Create an IAM role that has permissions to the S3 bucket.
C.Add the IAM role to an instance profile. Attach the instance profile to the EC2 instance.
D.Create an IAM role that has permissions to the S3 bucket. Assign the role to an 1AM group.
E.Store the credentials of the IAM user in the environment variables on the EC2 instance.

A

B.Create an IAM role that has permissions to the S3 bucket.

C.Add the IAM role to an instance profile. Attach the instance profile to the EC2 instance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly