00:15:00

Free AWS Certified Developer Associate DVA-C02 Practice Test

Prepare for the AWS Certified Developer Associate DVA-C02 exam with this free practice test. Randomly generated and customizable, this test allows you to choose the number of questions.

  • Questions: 15
  • Time: 15 minutes (60 seconds per question)
  • Included Objectives:
    • Development with AWS Services
    • Security
    • Deployment
    • Troubleshooting and Optimization
Question 1 of 15

You have been given the task to test an AWS Lambda function locally, which is designed to process JSON data from an Amazon API Gateway proxy integration. The function expects to receive a payload with a nested JSON object in the body that contains project details. Which of the following test events correctly emulates the expected format of the incoming event from API Gateway?

  • {"httpMethod": "POST", "body": "{"project": {"name": "New Project", "description": "An upcoming project."}}", "path": "/projects", "requestContext": {"httpMethod": "POST", "path": "/prod/projects"}, "isBase64Encoded": false}

  • {"httpMethod": "POST", "body": "{'project': {'name': 'New Project', 'description': 'An upcoming project.'}}", "path": "/projects", "requestContext": , "isBase64Encoded": false}

  • {"httpMethod": "POST", "body": "{"project": {"name": "New Project", "description": "An upcoming project"}}", "path": "/projects"}

  • {"method": "POST", "body": {"project": {"name": "New Project", "description": "An upcoming project."}}, "path": "/projects"}

Question 2 of 15

Which aspect of cloud application management involves the collection and analysis of data to understand the internal state of the system that can facilitate proactive identification and resolution of issues?

  • Logging

  • Monitoring

  • Observability

  • Caching

Question 3 of 15

A developer is configuring a Lambda function to access resources in a separate AWS account. To follow best security practices, the developer needs to grant the Lambda function the necessary permissions. What should the developer use to accomplish this?

  • Create an IAM role in the target account that the Lambda function can assume, with the necessary permissions attached.

  • Use the Lambda function's own execution role directly to access resources in the target account without assuming any roles.

  • Store the target account user's credentials in Lambda environment variables and use them to access resources.

  • Attach an inline policy to the Lambda function's execution role granting access to the target account resources.

Question 4 of 15

Your application, hosted on multiple Amazon EC2 instances, needs to perform periodic data processing tasks on an Amazon S3 bucket. The tasks require the application to have read, write, and list permissions on the bucket. To align with security best practices, which action should you take to grant these S3 permissions to the application?

  • Configure a resource-based policy on the S3 bucket to grant the EC2 instances the required permissions.

  • Attach an IAM managed policy with the required S3 permissions directly to the EC2 instances.

  • Create an IAM role with the specified S3 permissions and attach it to the EC2 instances using an instance profile.

  • Create an IAM user for each EC2 instance with permissions to access the S3 bucket and store the credentials in a configuration file on each instance.

Question 5 of 15

When developing serverless applications, it is possible to execute and debug your code on your local machine, simulating the cloud environment, without having to upload your functions to the actual cloud service each time during testing.

  • The statement is false; the framework requires all tests to be performed directly in the cloud and does not support local testing.

  • The statement is true; the framework allows for local testing and debugging which simulates the cloud environment.

Question 6 of 15

A software engineer needs to automate the deployment of a server-side application that relies on functions triggered by HTTP requests. The engineer plans to manage this application across various environments, each requiring distinct settings. Which service should the engineer choose to define the function triggers and environment configurations in a template format?

  • Deployment Automation Service

  • Pipeline Automation Service

  • Serverless Application Model

  • Infrastructure as Code Service

  • Cloud Infrastructure Development Kit

  • Web Application Hosting Service

Question 7 of 15

Your company's cloud architecture leans heavily on Lambda functions to process e-commerce transactions. The functions must scale automatically and remain unaffected by the state of previous invocations. Currently, a function processes payments by using an external payment gateway and it must reliably handle transactions during peak hours. To ensure that transaction handling by Lambda functions adheres to a stateless design, what should be done?

  • Configure the Lambda functions to process transactions asynchronously using an internal queue.

  • Use environment variables to store transaction state between invocations.

  • Store transaction state data in an external database or caching service such as Amazon DynamoDB or Amazon ElastiCache.

  • Enable automatic scaling on the Lambda function to handle the increased number of transactions.

Question 8 of 15

An application development team is leveraging a serverless framework provided by AWS to manage and deploy their serverless infrastructure. When the team needs to introduce new updates for testing that will not impact the live environment accessed by users, which action aligns best with this requirement?

  • Conduct IAM role permission testing to ensure that the updates will not affect user access control.

  • Deploy the updates to a separate staging environment that replicates the live settings.

  • Apply the updates in a different, unconnected environment to protect the live environment.

  • Update the live environment during off-peak hours to minimize the impact on end-users.

Question 9 of 15

A developer has deployed a web application that is exhibiting intermittent failures. To effectively monitor application behavior and quickly pinpoint these issues, which service could be used to analyze log data in real time and trigger appropriate responses based on specific log patterns?

  • Utilize Amazon RDS Performance Insights for log events assessment.

  • Set up AWS Lambda to poll logs periodically and act on them.

  • Implement Amazon S3 event notifications to monitor log object changes.

  • Use Amazon CloudWatch Logs to establish metric filters and alarms.

Question 10 of 15

Which service is designed to provide developers with insights into the performance and operation of their distributed applications, offering capabilities to collect, analyze, and visualize tracing data?

  • CloudTrail

  • Inspector

  • CloudFormation

  • X-Ray

Question 11 of 15

A developer is working on enhancing the security of a serverless infrastructure where user authentication is handled by an OIDC-compliant external identity provider. Upon a user's successful sign-in, the external service issues a token. The developer needs to ensure that this token is validated before allowing access to the serverless function endpoint. Which approach should the developer implement to enforce token validation?

  • Utilize a Lambda function programmed to evaluate and verify the token before proceeding with the request.

  • Apply a resource-based policy directly on the function to check for the presence of the token in the request.

  • Configure a role with specified permissions that authenticates users based on the provided token.

  • Deploy client-side certificates to secure the endpoint and validate the incoming tokens.

Question 12 of 15

Your team requires a service to handle feature flags and setting values, which are expected to frequently change. This service must allow you to validate the new configurations against a defined schema and provide mechanisms to deploy them on a scheduled basis or with a gradual rollout. In addition, limiting the percentage of the environment that receives these configuration updates at one time should be possible. Which service should be utilized to achieve this functionality?

  • Secrets Manager

  • CodePipeline

  • AppConfig

  • Parameter Store

Question 13 of 15

Which service is designed to support the management of settings at scale and enable safe deployment of configurations without necessitating code changes?

  • Secrets Manager

  • Parameter Store

  • AppConfig

  • CodeConfig

Question 14 of 15

A development team must secure sensitive customer files in cloud-based object storage. The requirements stipulate that the encryption keys used should be under the company's direct control, with an automated process for changing these keys periodically. Which service and configuration would best fulfill these criteria?

  • Use self-managed keys in Key Management Service set to automatically rotate for object storage server-side encryption

  • Adopt a hardware security module service for key storage and institute a manual rotation process

  • Enable a managed key rotation service within the platform's cloud object storage

  • Engage a private certificate authority to apply server-side encryption policies to the cloud storage

Question 15 of 15

When architecting a table in Amazon DynamoDB to catalog customer interactions that occur at various points in time, with the necessity to retrieve entries based on individual customer and specific date ranges, what key schema should the developer implement to support this access pattern efficiently?

  • Utilize only the time parameter of the interactions as the table's partition key without considering customer-specific sorting.

  • Implement a single unique identifier for all interactions without additional keys.

  • Design the table with a partition element for individual customer reference and a sort element capturing the time aspect of interactions.

  • Rely solely on the customer reference for the table's partition key without incorporating a sort element.