Amazon (DVA-C01) Exam Questions And Answers page 20
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?
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?
Increase the size of the RDS database to allow for an increased number of database connections each hour.
Move the database connection and close statement out of the handler. Place the connection in the global space.
Replace RDS wit Amazon DynamoDB to implement control over the number of writes per second.
Compute Services
Security and Identity Services
A Developer has published an update to an application that is served to a global user base using Amazon CloudFront. After deploying the application, users are not able to see the updated changes.
How can the Developer resolve this issue?
How can the Developer resolve this issue?
Remove the origin from the CloudFront configuration and add it again.
Disable forwarding of query strings and request headers from the CloudFront distribution configuration.
Invalidate all the application objects from the edge caches.
Disable the CloudFront distribution and enable it again to update all the edge locations.
Compute Services
Networking and Content Delivery
A Developer has setup an Amazon Kinesis Stream with 4 shards to ingest a maximum of 2500 records per second. A Lambda function has been configured to process these records.
In which order will these records be processed?
In which order will these records be processed?
Lambda will receive each record in the reverse order it was placed into the stream following a LIFO (last-in, first-out) method
Lambda will receive each record in the exact order it was placed into the stream following a FIFO (first-in, first-out) method.
Lambda will receive each record in the exact order it was placed into the shard following a FIFO (first-in, first-out) method. There is no guarantee of order across shards.
The Developer can select FIFO, (first-in, first-out), LIFO (last-in, last-out), random, or request specific record using the getRecords API.
Networking and Content Delivery
Deployment and Management
A Developer has setup an Amazon Kinesis Stream with 4 shards to ingest a maximum of 2500 records per second. A Lambda function has been configured to process these records.
In which order will these records be processed?
In which order will these records be processed?
Lambda will receive each record in the reverse order it was placed into the stream following a LIFO (last-in, first-out) method
Lambda will receive each record in the exact order it was placed into the stream following a FIFO (first-in, first-out) method.
Lambda will receive each record in the exact order it was placed into the shard following a FIFO (first-in, first-out) method. There is no guarantee of order across shards.
The Developer can select FIFO, (first-in, first-out), LIFO (last-in, last-out), random, or request specific record using the getRecords API.
Networking and Content Delivery
Deployment and Management
A developer has three microservice projects that are separated into different folders under the same AWS CodeCommit repository. Each project has a separate AWS CodePipeline pipeline. The developer notices that when changes are pushed to one microservice, all three pipelines begin to run.
The developer needs to ensure that only relevant pipelines run. The developer cannot make any changes to how the repository is organized.
Which solution will meet these requirements?
The developer needs to ensure that only relevant pipelines run. The developer cannot make any changes to how the repository is organized.
Which solution will meet these requirements?
For each of the three microservice projects, create a separate CodeCommit repository.
Create an Amazon EventBridge (Amazon CloudWatch Events) rule that invokes an AWS Lambda function to evaluate changes to the repository and run the appropriate pipeline.
Create an Amazon API Gateway API that is backed by an AWS Lambda function to determine the appropriate pipeline to run. Add the API endpoint to a webhook in CodeCommit.
Migrate all three pipelines to a single pipeline. Add conditional stages to build a certain microservice project.
Deployment and Management
A developer has written a multi-threaded application that is running on a fleet of Amazon EC2 instances. The operations team has requested a graphical method to monitor the number of running threads over time.
What is the MOST efficient way to fulfill this request?
What is the MOST efficient way to fulfill this request?
Periodically send the thread count to AWS X-Ray segments, then generate a service graph on demand.
Create a custom Amazon CloudWatch metric and periodically perform a PutMetricData call with the current thread count.
Periodically log thread count data to Amazon S3. Use Amazon Kinesis to process the data into a graph.
Periodically write the current thread count to a table using Amazon DynamoDB and use Amazon CloudFront to create a graph.
Compute Services
Monitoring and Troubleshooting
A developer has written a multi-threaded application that is running on a fleet of Amazon EC2 instances. The operations team has requested a graphical method to monitor the number of running threads over time.
What is the MOST efficient way to fulfill this request?
What is the MOST efficient way to fulfill this request?
Periodically send the thread count to AWS X-Ray segments, then generate a service graph on demand.
Create a custom Amazon CloudWatch metric and periodically perform a PutMetricData call with the current thread count.
Periodically log thread count data to Amazon S3. Use Amazon Kinesis to process the data into a graph.
Periodically write the current thread count to a table using Amazon DynamoDB and use Amazon CloudFront to create a graph.
Compute Services
Monitoring and Troubleshooting
A Developer has written an Amazon Kinesis Data Streams application. As usage grows and traffic increases over time, the application is regularly receiving ProvisionedThroughputExceededException error messages.
Which steps should the Developer take to resolve the error? (Choose two.)
Which steps should the Developer take to resolve the error? (Choose two.)
Use Auto Scaling to scale the stream for better performance
Increase the delay between the GetRecords call and the PutRecords call
Increase the number of shards in the data stream
Specify a shard iterator using the ShardIterator parameter
Implement exponential backoff on the GetRecords call and the PutRecords call
Storage Services
Deployment and Management
A developer has written an application hosted on Amazon EC2 instances. The application generates and uploads thousands of new objects to an Amazon S3 bucket located in the same AWS Region. The size of each object is less than 1 MB. The application is taking too long to run.
How can the performance of the application be improved?
How can the performance of the application be improved?
Use the S3 Multipart Upload API.
Use S3 Transfer Acceleration.
Upload the objects in parallel to Amazon S3.
Add a random prefix to the object Keys.
Compute Services
Storage Services
A Developer has written an application that runs on Amazon EC2 instances and generates a value every minute. The Developer wants to monitor and graph the values generated over time without logging in to the instance each time.
Which approach should the Developer use to achieve this goal?
Which approach should the Developer use to achieve this goal?
Use the Amazon CloudWatch metrics reported by default for all EC2 instances. View each value from the CloudWatch console.
Develop the application to store each value in a file on Amazon S3 every minute with the timestamp as the name.
Publish each generated value as a custom metric to Amazon CloudWatch using available AWS SDKs.
Store each value as a variable and add the variable to the list of EC2 metrics that should be reported to the Amazon CloudWatch console.
Networking and Content Delivery
Monitoring and Troubleshooting
Comments