Amazon AWS Certified Developer - Associate DVA-C02 Exam Practice Questions (P. 5)
- Full Access (557 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #41
A developer is building a web application that uses Amazon API Gateway to expose an AWS Lambda function to process requests from clients. During testing, the developer notices that the API Gateway times out even though the Lambda function finishes under the set time limit.
Which of the following API Gateway metrics in Amazon CloudWatch can help the developer troubleshoot the issue? (Choose two.)
Which of the following API Gateway metrics in Amazon CloudWatch can help the developer troubleshoot the issue? (Choose two.)
- ACacheHitCount
- BIntegrationLatencyMost Voted
- CCacheMissCount
- DLatencyMost Voted
- ECount
Correct Answer:
BD
BD
send
light_mode
delete
Question #42
A development team wants to build a continuous integration/continuous delivery (CI/CD) pipeline. The team is using AWS CodePipeline to automate the code build and deployment. The team wants to store the program code to prepare for the CI/CD pipeline.
Which AWS service should the team use to store the program code?
Which AWS service should the team use to store the program code?
- AAWS CodeDeploy
- BAWS CodeArtifact
- CAWS CodeCommitMost Voted
- DAmazon CodeGuru
Correct Answer:
C
C
send
light_mode
delete
Question #43
A developer is designing an AWS Lambda function that creates temporary files that are less than 10 MB during invocation. The temporary files will be accessed and modified multiple times during invocation. The developer has no need to save or retrieve these files in the future.
Where should the temporary files be stored?
Where should the temporary files be stored?
- Athe /tmp directoryMost Voted
- BAmazon Elastic File System (Amazon EFS)
- CAmazon Elastic Block Store (Amazon EBS)
- DAmazon S3
Correct Answer:
A
A
send
light_mode
delete
Question #44
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?
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.Most Voted
- 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.
Correct Answer:
B
B
send
light_mode
delete
Question #45
A developer is writing an AWS Lambda function. The developer wants to log key events that occur while the Lambda function runs. The developer wants to include a unique identifier to associate the events with a specific function invocation. The developer adds the following code to the Lambda function:

Which solution will meet this requirement?

Which solution will meet this requirement?
- AObtain the request identifier from the AWS request ID field in the context object. Configure the application to write logs to standard output.Most Voted
- BObtain the request identifier from the AWS request ID field in the event object. Configure the application to write logs to a file.
- CObtain the request identifier from the AWS request ID field in the event object. Configure the application to write logs to standard output.
- DObtain the request identifier from the AWS request ID field in the context object. Configure the application to write logs to a file.
Correct Answer:
D
D
send
light_mode
delete
Question #46
A developer is working on a serverless application that needs to process any changes to an Amazon DynamoDB table with an AWS Lambda function.
How should the developer configure the Lambda function to detect changes to the DynamoDB table?
How should the developer configure the Lambda function to detect changes to the DynamoDB table?
- ACreate an Amazon Kinesis data stream, and attach it to the DynamoDB table. Create a trigger to connect the data stream to the Lambda function.
- BCreate an Amazon EventBridge rule to invoke the Lambda function on a regular schedule. Conned to the DynamoDB table from the Lambda function to detect changes.
- CEnable DynamoDB Streams on the table. Create a trigger to connect the DynamoDB stream to the Lambda function.Most Voted
- DCreate an Amazon Kinesis Data Firehose delivery stream, and attach it to the DynamoDB table. Configure the delivery stream destination as the Lambda function.
Correct Answer:
C
C
send
light_mode
delete
Question #47
An application uses an Amazon EC2 Auto Scaling group. A developer notices that EC2 instances are taking a long time to become available during scale-out events. The UserData script is taking a long time to run.
The developer must implement a solution to decrease the time that elapses before an EC2 instance becomes available. The solution must make the most recent version of the application available at all times and must apply all available security updates. The solution also must minimize the number of images that are created. The images must be validated.
Which combination of steps should the developer take to meet these requirements? (Choose two.)
The developer must implement a solution to decrease the time that elapses before an EC2 instance becomes available. The solution must make the most recent version of the application available at all times and must apply all available security updates. The solution also must minimize the number of images that are created. The images must be validated.
Which combination of steps should the developer take to meet these requirements? (Choose two.)
- AUse EC2 Image Builder to create an Amazon Machine Image (AMI). Install all the patches and agents that are needed to manage and run the application. Update the Auto Scaling group launch configuration to use the AMI.Most Voted
- BUse EC2 Image Builder to create an Amazon Machine Image (AMI). Install the latest version of the application and all the patches and agents that are needed to manage and run the application. Update the Auto Scaling group launch configuration to use the AMI.
- CSet up AWS CodeDeploy to deploy the most recent version of the application at runtime.
- DSet up AWS CodePipeline to deploy the most recent version of the application at runtime.
- ERemove any commands that perform operating system patching from the UserData script.Most Voted
Correct Answer:
AB
AB
send
light_mode
delete
Question #48
A developer is creating an AWS Lambda function that needs credentials to connect to an Amazon RDS for MySQL database. An Amazon S3 bucket currently stores the credentials. The developer needs to improve the existing solution by implementing credential rotation and secure storage. The developer also needs to provide integration with the Lambda function.
Which solution should the developer use to store and retrieve the credentials with the LEAST management overhead?
Which solution should the developer use to store and retrieve the credentials with the LEAST management overhead?
- AStore the credentials in AWS Systems Manager Parameter Store. Select the database that the parameter will access. Use the default AWS Key Management Service (AWS KMS) key to encrypt the parameter. Enable automatic rotation for the parameter. Use the parameter from Parameter Store on the Lambda function to connect to the database.
- BEncrypt the credentials with the default AWS Key Management Service (AWS KMS) key. Store the credentials as environment variables for the Lambda function. Create a second Lambda function to generate new credentials and to rotate the credentials by updating the environment variables of the first Lambda function. Invoke the second Lambda function by using an Amazon EventBridge rule that runs on a schedule. Update the database to use the new credentials. On the first Lambda function, retrieve the credentials from the environment variables. Decrypt the credentials by using AWS KMS, Connect to the database.
- CStore the credentials in AWS Secrets Manager. Set the secret type to Credentials for Amazon RDS database. Select the database that the secret will access. Use the default AWS Key Management Service (AWS KMS) key to encrypt the secret. Enable automatic rotation for the secret. Use the secret from Secrets Manager on the Lambda function to connect to the database.Most Voted
- DEncrypt the credentials by using AWS Key Management Service (AWS KMS). Store the credentials in an Amazon DynamoDB table. Create a second Lambda function to rotate the credentials. Invoke the second Lambda function by using an Amazon EventBridge rule that runs on a schedule. Update the DynamoDB table. Update the database to use the generated credentials. Retrieve the credentials from DynamoDB with the first Lambda function. Connect to the database.
Correct Answer:
C
C
send
light_mode
delete
Question #49
A developer has written the following IAM policy to provide access to an Amazon S3 bucket:

Which access does the policy allow regarding the s3:GetObject and s3:PutObject actions?

Which access does the policy allow regarding the s3:GetObject and s3:PutObject actions?
- AAccess on all buckets except the “DOC-EXAMPLE-BUCKET” bucket
- BAccess on all buckets that start with “DOC-EXAMPLE-BUCKET” except the “DOC-EXAMPLE-BUCKET/secrets” bucket
- CAccess on all objects in the “DOC-EXAMPLE-BUCKET” bucket along with access to all S3 actions for objects in the “DOC-EXAMPLE-BUCKET” bucket that start with “secrets”
- DAccess on all objects in the “DOC-EXAMPLE-BUCKET” bucket except on objects that start with “secrets”Most Voted
Correct Answer:
D
D
send
light_mode
delete
Question #50
A developer is creating a mobile app that calls a backend service by using an Amazon API Gateway REST API. For integration testing during the development phase, the developer wants to simulate different backend responses without invoking the backend service.
Which solution will meet these requirements with the LEAST operational overhead?
Which solution will meet these requirements with the LEAST operational overhead?
- ACreate an AWS Lambda function. Use API Gateway proxy integration to return constant HTTP responses.
- BCreate an Amazon EC2 instance that serves the backend REST API by using an AWS CloudFormation template.
- CCustomize the API Gateway stage to select a response type based on the request.
- DUse a request mapping template to select the mock integration response.Most Voted
Correct Answer:
B
B
send
light_mode
delete
All Pages