DVA-C02 exam dumps

DVA-C02 practice question 216 of 399

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

DVA-C02 Question 216

Select 2

You are deploying a Node.js application using AWS Elastic Beanstalk. The application requires a specific version of Node.js and additional environment variables for configuration. Which steps should you take to ensure a successful deployment?

  1. A

    Specify the desired Node.js version in a .platform folder with a platform.yaml file in the application source bundle.

  2. B

    Use an .ebextensions folder to define environment variables via configuration files.

  3. C

    Set the Node.js version and environment variables directly in the Elastic Beanstalk console after deploying the application.

  4. D

    Include a package.json file in the source bundle that specifies the required Node.js version.

  5. E

    Use the Elastic Beanstalk CLI commands to create an environment and specify the Node.js version during creation.

Show answer and explanation

Correct answers: B, D

Explanation

To ensure a successful deployment of a Node.js application on Elastic Beanstalk, you should include a package.json file in the application source bundle to specify the required Node.js version. Additionally, environment variables can be configured using .ebextensions configuration files during deployment. These steps allow for automated and repeatable deployments while adhering to best practices.

  • A. Incorrect.

    Incorrect: Elastic Beanstalk does not use a .platform folder or platform.yaml file for specifying the runtime or configuration. This is not a valid step for deploying a Node.js application.

  • B. Correct.

    Correct: The .ebextensions folder can contain configuration files (e.g., .config) where you can define environment variables and other settings for the Elastic Beanstalk environment.

  • C. Incorrect.

    Incorrect: While you can set environment variables in the Elastic Beanstalk console, this is not a recommended approach for automating deployments or version control. Additionally, the Node.js version cannot be set directly through the console post-deployment.

  • D. Correct.

    Correct: Including a package.json file in the source bundle allows Elastic Beanstalk to detect and use the required Node.js version specified in the engines field.

  • E. Incorrect.

    Incorrect: The Elastic Beanstalk CLI does not allow you to directly specify the Node.js version during environment creation. The Node.js version is determined by the platform configuration or the package.json file.

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