Amazon DVA-C01 Practice Test - Questions Answers, Page 7
List of questions
Question 61

What are the steps to using the AWS CLI to launch a templatized serverless application?
Explanation:
https://docs.aws.amazon.com/cli/latest/reference/cloudformation/package.html
Question 62

A Developer is creating a web application that requires authentication, but also needs to support guest access to provide users limited access without having to authenticate. What service can provide support for the application to allow guest access?
Explanation:
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverlessgetting-started-hello-world.html
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-clicommand-reference-sam-deploy.html https://docs.aws.amazon.com/serverless-applicationmodel/latest/developerguide/sam-cli-command-reference- sam-package.html
Question 63

An application takes 40 seconds to process instructions received in an Amazon SQS message.
Assuming the SQS queue is configured with the default VisibilityTimeout value, what is the BEST way, upon receiving a message, to ensure that no other instances can retrieve a message that has already been processed or is currently being processed?
Explanation:
https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibilitytimeout.htmlIn SQS, messages remain there. It is the consumer’s responsibility to delete it, once consumed andprocessed.
Question 64

A Developer has implemented a Lambda function that needs to add new customers to an RDS database that is expected to run hundreds of times per hour. The Lambda function is configured to use 512MB of RAM and is based on the following pseudo code:
After testing the Lambda function, the Developer notices that the Lambda execution time is much longer than expected. What should the Developer do to improve performance?
Explanation:
Refer AWS documentation - Lambda Best Practices
Take advantage of Execution Context reuse to improve the performance of your function. Make sure any externalized configuration or dependencies that your code retrieves are stored and referenced locally after initial execution. Limit the re-initialization of variables/objects on every invocation.
Instead use static initialization/constructor, global/static variables and singletons. Keep alive and reuse connections (HTTP, database, etc.) that were established during a previous invocation.
Question 65

A current architecture uses many Lambda functions invoking one another as a large state machine.
The coordination of this state machine is legacy custom code that breaks easily.
Which AWS Service can help refactor and manage the state machine?
Explanation:
https://aws.amazon.com/step-functions/
Question 66

A Developer is asked to implement a caching layer in front of Amazon RDS. Cached content is expensive to regenerate in case of service failure. Which implementation below would work while maintaining maximum uptime?
Explanation:
https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/SelectEngine.html
Question 67

A large e-commerce site is being designed to deliver static objects from Amazon S3. The Amazon S3 bucket wills server more than 300 GET requests per second. What should be done to optimize performance? (Select TWO.)
Explanation:
CloudWatch definitely. Random key prefixes is still a valid method of improving performance by using parallel reads. It doesn't mention prefix hashing. For instance prefixes 1/,2/,3/,4,5/ could provide 5 x parallel streams for S3 as opposed to all objects being in a single folder/prefix e.g. dev/
https://docs.aws.amazon.com/AmazonS3/latest/dev/optimizing-performance.html"There are no limits to the number of prefixes in a bucket. You can increase your read or writeperformance by parallelizing reads. For example, if you create 10 prefixes in an Amazon S3 bucket toparallelize reads, you could scale your read performance to 55,000 read requests per second." Theassumption that prefixes don't matter is incorrect, as described by "Amazon S3 performance guidelines recommended randomizing prefix naming with **hashed characters** to optimize performance for frequent data retrievals. You no longer have to randomize prefix naming for performance, and can use sequential date-based naming for your prefixes"
Question 68

A company is building a stock trading application that requires sub-millisecond latency in processing trading requests. Amazon DynamoDB is used to store all the trading data that is used to process each request. After load testing the application, the development team found that due to data retrieval times, the latency requirement is not satisfied. Because of sudden high spikes in the number of requests, DynamoDB read capacity has to be significantly over-provisioned to avoid throttling.
What steps should be taken to meet latency requirements and reduce the cost of running the application?
Explanation:
Refer AWS documentation - DynamoDB Accelerator
Amazon DynamoDB Accelerator (DAX) is a fully managed, highly available, inmemory cache for DynamoDB that delivers up to a 10x performance improvement – from milliseconds to microseconds – even at millions of requests per second. DAX does all the heavy lifting required to add in-memory acceleration to your DynamoDB tables, without requiring developers to manage cache invalidation, data population, or cluster management. Now you can focus on building great applications for your customers without worrying about performance at scale.
Question 69

A Developer needs temporary access to resources in a second account.
What is the MOST secure way to achieve this?
Question 70

An application reads data from an Amazon DynamoDB table. Several times a day, for a period of 15 seconds, the application receives multiple ProvisionedThroughputExceeded errors. How should this exception be handled?
Explanation:
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Programming.Errors.html
Question