DVA-C02 exam dumps

DVA-C02 practice question 214 of 399

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

DVA-C02 Question 214

Single answer

You are deploying a serverless application using AWS SAM (Serverless Application Model). During the deployment process, you want to ensure that the deployment creates a new version of your AWS Lambda function and automatically sets an alias to point to the most recent version. Which AWS SAM feature should you use to achieve this?

  1. A

    AutoPublishAlias property in the AWS::Serverless::Function resource

  2. B

    Versioning property in the AWS::Lambda::Alias resource

  3. C

    DeploymentPreference property in the AWS::Serverless::Function resource

  4. D

    UpdatePolicy attribute in the AWS::Serverless::Application resource

Show answer and explanation

Correct answer: A

Explanation

To automatically create a new version of an AWS Lambda function and set an alias to point to the most recent version during deployment, you should use the AutoPublishAlias property in the AWS::Serverless::Function resource. This feature simplifies managing Lambda function versions and aliases, which are often needed for advanced deployment strategies.

  • A. Correct.

    The AutoPublishAlias property in the AWS::Serverless::Function resource automatically creates a version of the AWS Lambda function and configures an alias that points to the published version. This is the correct feature for this scenario.

  • B. Incorrect.

    The Versioning property in the AWS::Lambda::Alias resource does not exist. This is an incorrect option as it refers to a non-existent property.

  • C. Incorrect.

    The DeploymentPreference property in the AWS::Serverless::Function resource is used for configuring deployment strategies for Lambda functions, such as canary or linear deployments. However, it does not create function versions or aliases automatically.

  • D. Incorrect.

    The UpdatePolicy attribute in the AWS::Serverless::Application resource is not valid. Update policies are typically used in CloudFormation for managing resources like Auto Scaling groups but are not related to Lambda function versioning or aliasing.

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