AWS Certified Developer Associate practice questions, page 11 of 18, with answer review and explanations.
Question 51
A Developer is working on a serverless project based in Java. Initial testing shows a cold start takes about 8 seconds on average for AWS Lambda functions. What should the Developer do to reduce the cold start time? (Choose two.)
Add the Spring Framework to the project and enable dependency injection.
Reduce the deployment package by including only needed modules from the AWS SDK for Java.
Increase the memory allocation setting for the Lambda function.
Increase the timeout setting for the Lambda function.
Change the Lambda invocation mode from synchronous to asynchronous.
Question 52
A company runs an e-commerce website that uses Amazon DynamoDB where pricing for items is dynamically updated in real time. At any given time, multiple updates may occur simultaneously for pricing information on a particular product. This is causing the original editor's changes to be overwritten without a proper review process. Which DynamoDB write option should be selected to prevent this overwriting?
Concurrent writes
Conditional writes
Atomic writes
Batch writes
Question 53
A developer is storing JSON files in an Amazon S3 bucket. The developer wants to securely share an object with a specific group of people. How can the developer securely provide temporary access to the objects that are stored in the S3 bucket?
Set object retention on the files. Use the AWS software development kit (SDK) to restore the object before subsequent requests. Provide the bucket's S3 URL.
Use the AWS software development kit (SDK) to generate a presigned URL. Provide the presigned URL.
Set a bucket policy that restricts access after a period of time. Provide the bucket's S3 URL.
Configure static web hosting on the S3 bucket. Provide the bucket's web URL.
Question 54
A front-end web application is using Amazon Cognito user pools to handle the user authentication flow. A developer is integrating Amazon DynamoDB into the application using the AWS SDK for JavaScript. How would the developer securely call the API without exposing the access or secret keys?
Configure Amazon Cognito identity pools and exchange the JSON Web Token (JWT) for temporary credentials.
Run the web application in an Amazon EC2 instance with the instance profile configured.
Hardcore the credentials, use Amazon S3 to host the web application, and enable server-side encryption.
Use Amazon Cognito user pool JSON Web Tokens (JWITs) to access the DynamoDB APIs.
Question 55
A Developer must build an application that uses Amazon DynamoDB. The requirements state that the items being stored in the DynamoDB table will be 7KB in size and that reads must be strongly consistent. The maximum read rate is 3 items per second, and the maximum write rate is 10 items per second. How should the Developer size the DynamoDB table to meet these requirements?
Read: 3 read capacity units Write: 70 write capacity units
Read: 6 read capacity units Write: 70 write capacity units
Read: 6 read capacity units Write: 10 write capacity units
Read: 3 read capacity units Write: 10 write capacity units