AWS Certified Developer – Associate — All Questions

4 questions

Deployment

A team wants to shift 10% of production traffic to a new Lambda version, then automatically roll back if a CloudWatch alarm fires. Which approach achieves this?

  • a.Manually edit the function code in the console
  • b.Use a CodeDeploy canary deployment with a Lambda alias and rollback on alarm
  • c.Delete the old version before deploying
  • d.Increase the function timeout

CodeDeploy's canary (or linear) deployment configurations shift a small percentage of traffic to the new version behind an alias and roll back automatically when a specified CloudWatch alarm triggers. Manual edits, deleting the old version, or changing timeouts do not provide controlled traffic shifting or automatic rollback.

Deployment

Which file tells AWS CodeBuild the commands to run in each build phase and which artifacts to output?

  • a.buildspec.yml
  • b.appspec.yml
  • c.Dockerfile
  • d.template.yaml

CodeBuild reads buildspec.yml to run install, pre_build, build, and post_build phases and to declare output artifacts. appspec is used by CodeDeploy, a Dockerfile builds container images, and template.yaml is a SAM/CloudFormation template.

Deployment

A developer wants to define a serverless application (Lambda, API Gateway, DynamoDB) with concise templates that can be tested locally. Which tool is designed for this?

  • a.Amazon Inspector
  • b.AWS Config
  • c.AWS Serverless Application Model (SAM)
  • d.Amazon Athena

AWS SAM extends CloudFormation with shorthand for serverless resources and offers the SAM CLI for local build and test. Inspector assesses security, Config tracks resource configuration, and Athena queries data in S3.

Deployment

Why should Lambda deployments use published versions with an alias rather than always deploying to $LATEST?

  • a.$LATEST runs faster
  • b.Aliases reduce cold starts
  • c.Versions cost less to invoke
  • d.Immutable versions let you point a stable alias and roll back instantly by moving it

Published versions are immutable snapshots; an alias points to a version, so rolling back is as simple as moving the alias to a previous version. This gives predictable releases and fast rollback. Aliases and versions do not change execution speed, cold starts, or invocation cost.

Report