DVA-C02 exam dumps

DVA-C02 practice question 232 of 399

AWS Certified Developer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DVA-C02 Question 232

Select 3

A developer is working on an AWS Lambda function that needs to pull code from a Git-based repository hosted on AWS CodeCommit. The developer wants to implement a CI/CD pipeline for automatic deployment whenever changes are pushed to the repository. Which of the following steps must the developer take to achieve this?

  1. A

    Set up an Amazon EventBridge rule to trigger the pipeline on repository changes.

  2. B

    Configure an AWS CodePipeline pipeline with a source stage connected to the AWS CodeCommit repository.

  3. C

    Manually deploy the Lambda function after every commit to the repository.

  4. D

    Create an IAM role with permissions for AWS CodeCommit and assign it to the Lambda function.

  5. E

    Add a build stage in the pipeline to package the Lambda function code.

Show answer and explanation

Correct answers: A, B, E

Explanation

To implement an automated CI/CD pipeline for a Lambda function using AWS CodeCommit, you must set up an EventBridge rule to trigger the pipeline on repository changes, configure a CodePipeline pipeline with a source stage connected to the repository, and include a build stage to package the Lambda function code. These steps ensure end-to-end automation from code changes to deployment.

  • A. Correct.

    Correct: Amazon EventBridge (formerly CloudWatch Events) can be used to detect changes in the CodeCommit repository and trigger the CI/CD pipeline.

  • B. Correct.

    Correct: AWS CodePipeline is designed to automate the CI/CD process. The pipeline needs a source stage connected to the CodeCommit repository to retrieve code changes.

  • C. Incorrect.

    Incorrect: Manual deployment contradicts the goal of implementing a CI/CD pipeline and is not required in an automated setup.

  • D. Incorrect.

    Incorrect: While the Lambda function needs appropriate permissions to execute, the IAM role for CodeCommit is irrelevant for triggering or deploying the pipeline.

  • E. Correct.

    Correct: A build stage is required to package the Lambda function code properly (e.g., zipping files, installing dependencies) before deployment.

Timed practice exam

Take a DVA-C02 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam