Amazon AWS Certified Developer - Associate DVA-C02
Prev

There are 313 results

Next
#171 (Accuracy: 100% / 4 votes)
A developer is creating an AWS Lambda function that will generate and export a file. The function requires 100 MB of temporary storage for temporary files while running. These files will not be needed after the function is complete.

How can the developer MOST efficiently handle the temporary files?
  • A. Store the files in Amazon Elastic Block Store (Amazon EBS) and delete the files at the end of the Lambda function.
  • B. Copy the files to Amazon Elastic File System (Amazon EFS) and delete the files at the end of the Lambda function.
  • C. Store the files in the /tmp directory and delete the files at the end of the Lambda function.
  • D. Copy the files to an Amazon S3 bucket with a lifecycle policy to delete the files.
#172 (Accuracy: 100% / 4 votes)
A company wants to automate part of its deployment process. A developer needs to automate the process of checking for and deleting unused resources that supported previously deployed stacks but that are no longer used.

The company has a central application that uses the AWS Cloud Development Kit (AWS CDK) to manage all deployment stacks.
The stacks are spread out across multiple accounts. The developer’s solution must integrate as seamlessly as possible within the current deployment process.

Which solution will meet these requirements with the LEAST amount of configuration?
  • A. In the central AWS CDK application, write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an AWS CloudFormation template from a JSON file. Use the template to attach the function code to an AWS Lambda function and to invoke the Lambda function when the deployment stack runs.
  • B. In the central AWS CDK application, write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an AWS CDK custom resource. Use the custom resource to attach the function code to an AWS Lambda function and to invoke the Lambda function when the deployment stack runs.
  • C. In the central AWS CDK, write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an API in AWS Amplify. Use the API to attach the function code to an AWS Lambda function and to invoke the Lambda function when the deployment stack runs.
  • D. In the AWS Lambda console, write a handler function in the code that uses AWS SDK calls to check for and delete unused resources. Create an AWS CDK custom resource. Use the custom resource to import the Lambda function into the stack and to invoke the Lambda function when the deployment stack runs.
#173 (Accuracy: 100% / 4 votes)
A developer is storing sensitive data generated by an application in Amazon S3. The developer wants to encrypt the data at rest. A company policy requires an audit trail of when the AWS Key Management Service (AWS KMS) key was used and by whom.

Which encryption option will meet these requirements?
  • A. Server-side encryption with Amazon S3 managed keys (SSE-S3)
  • B. Server-side encryption with AWS KMS managed keys (SSE-KMS)
  • C. Server-side encryption with customer-provided keys (SSE-C)
  • D. Server-side encryption with self-managed keys
#174 (Accuracy: 100% / 3 votes)
A developer is building a serverless application that is based on AWS Lambda. The developer initializes the AWS software development kit (SDK) outside of the Lambda handler function.

What is the PRIMARY benefit of this action?
  • A. Improves legibility and stylistic convention
  • B. Takes advantage of runtime environment reuse
  • C. Provides better error handling
  • D. Creates a new SDK instance for each invocation
#175 (Accuracy: 100% / 4 votes)
A developer is writing a serverless application that requires an AWS Lambda function to be invoked every 10 minutes.

What is an automated and serverless way to invoke the function?
  • A. Deploy an Amazon EC2 instance based on Linux, and edit its /etc/crontab file by adding a command to periodically invoke the Lambda function.
  • B. Configure an environment variable named PERIOD for the Lambda function. Set the value to 600.
  • C. Create an Amazon EventBridge rule that runs on a regular schedule to invoke the Lambda function.
  • D. Create an Amazon Simple Notification Service (Amazon SNS) topic that has a subscription to the Lambda function with a 600-second timer.
#176 (Accuracy: 100% / 5 votes)
A company created four AWS Lambda functions that connect to a relational database server that runs on an Amazon RDS instance. A security team requires the company to automatically change the database password every 30 days.

Which solution will meet these requirements MOST securely?
  • A. Store the database credentials in the environment variables of the Lambda function. Deploy the Lambda function with the new credentials every 30 days.
  • B. Store the database credentials in AWS Secrets Manager. Configure a 30-day rotation schedule for the credentials.
  • C. Store the database credentials in AWS Systems Manager Parameter Store secure strings. Configure a 30-day schedule for the secure strings.
  • D. Store the database credentials in an Amazon S3 bucket that uses server-side encryption with customer-provided encryption keys (SSE-C). Configure a 30-day key rotation schedule for the customer key.
#177 (Accuracy: 100% / 3 votes)
A company is developing an ecommerce application that uses Amazon API Gateway APIs. The application uses AWS Lambda as a backend. The company needs to test the code in a dedicated, monitored test environment before the company releases the code to the production environment.

Which solution will meet these requirements?
  • A. Use a single stage in API Gateway. Create a Lambda function for each environment. Configure API clients to send a query parameter that indicates the environment and the specific Lambda function.
  • B. Use multiple stages in API Gateway. Create a single Lambda function for all environments. Add different code blocks for different environments in the Lambda function based on Lambda environment variables.
  • C. Use multiple stages in API Gateway. Create a Lambda function for each environment. Configure API Gateway stage variables to route traffic to the Lambda function in different environments.
  • D. Use a single stage in API Gateway. Configure API clients to send a query parameter that indicates the environment. Add different code blocks for different environments in the Lambda function to match the value of the query parameter.
#178 (Accuracy: 95% / 5 votes)
A developer is configuring an application's deployment environment in AWS CodePipeline. The application code is stored in a GitHub repository. The developer wants to ensure that the repository package's unit tests run in the new deployment environment. The developer has already set the pipeline's source provider to GitHub and has specified the repository and branch to use in the deployment.

Which combination of steps should the developer take next to meet these requirements with the LEAST overhead? (Choose two.)
  • A. Create an AWS CodeCommit project. Add the repository package's build and test commands to the project's buildspec.
  • B. Create an AWS CodeBuild project. Add the repository package's build and test commands to the project's buildspec.
  • C. Create an AWS CodeDeploy project. Add the repository package's build and test commands to the project's buildspec.
  • D. Add an action to the source stage. Specify the newly created project as the action provider. Specify the build artifact as the action's input artifact.
  • E. Add a new stage to the pipeline after the source stage. Add an action to the new stage. Specify the newly created project as the action provider. Specify the source artifact as the action's input artifact.
#179 (Accuracy: 90% / 6 votes)
A developer is using AWS Amplify Hosting to build and deploy an application. The developer is receiving an increased number of bug reports from users. The developer wants to add end-to-end testing to the application to eliminate as many bugs as possible before the bugs reach production.
Which solution should the developer implement to meet these requirements?
  • A. Run the amplify add test command in the Amplify CLI.
  • B. Create unit tests in the application. Deploy the unit tests by using the amplify push command in the Amplify CLI.
  • C. Add a test phase to the amplify.yml build settings for the application.
  • D. Add a test phase to the aws-exports.js file for the application.
#180 (Accuracy: 100% / 2 votes)
An application uses Lambda functions to extract metadata from files uploaded to an S3 bucket; the metadata is stored in Amazon DynamoDB. The application starts behaving unexpectedly, and the developer wants to examine the logs of the Lambda function code for errors.
Based on this system configuration, where would the developer find the logs?
  • A. Amazon S3
  • B. AWS CloudTrail
  • C. Amazon CloudWatch
  • D. Amazon DynamoDB