DVA-C02 exam dumps

DVA-C02 practice question 287 of 399

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

DVA-C02 Question 287

Single answer

A development team is using AWS CodePipeline to automate their CI/CD workflow. The team wants to integrate their Git-based version control system, hosted on GitHub, to automatically trigger the pipeline whenever new changes are pushed to the 'main' branch. What is the most appropriate way to achieve this?

  1. A

    Use the GitHub source action in CodePipeline and configure a webhook from GitHub to trigger the pipeline.

  2. B

    Manually upload the source code from GitHub to an S3 bucket and use the S3 bucket as the source for CodePipeline.

  3. C

    Use AWS CodeCommit as the source for CodePipeline and set up a GitHub action to sync changes from GitHub to CodeCommit.

  4. D

    Configure a cron job in an EC2 instance to periodically pull changes from GitHub and trigger the CodePipeline manually.

Show answer and explanation

Correct answer: A

Explanation

The GitHub source action in AWS CodePipeline provides a seamless way to integrate with a GitHub repository. By configuring a webhook, CodePipeline can automatically start the pipeline whenever there are changes in the specified branch of the repository, such as 'main'. This approach is both efficient and aligned with AWS best practices for CI/CD.

  • A. Correct.

    Correct. The GitHub source action in CodePipeline allows you to directly integrate with GitHub. Configuring a webhook ensures that changes in the GitHub repository automatically trigger the pipeline.

  • B. Incorrect.

    Incorrect. Manually uploading the source code to S3 is not an automated process and does not utilize the GitHub integration provided by CodePipeline.

  • C. Incorrect.

    Incorrect. While using AWS CodeCommit as a source is supported, it introduces unnecessary complexity by requiring you to sync changes between GitHub and CodeCommit.

  • D. Incorrect.

    Incorrect. A cron job on an EC2 instance would be a manual and inefficient solution compared to the native integration provided by CodePipeline with GitHub.

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