Course menuDOP-C02

Exams / DOP-C02 / Lambda deployments (aliases, traffic shifting, SAM) / Question 2

DOP-C02 practice question: Lambda deployments (aliases, traffic shifting, SAM) (2 of 2)

SDLC Automation A free question from our original DOP-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A SaaS startup publishes a shared logging layer for AWS Lambda. The layer is used by 30 functions owned by teams in 12 accounts within one AWS Organization, and each function references a specific version of the layer by its ARN.

Layer versions cannot be changed after they are published. When the logging code needs a fix, every consuming team must be able to move its functions to the new version during its own deployment.

The layer must not be public, and no team may copy the logging code into its own function package.

Which approach meets these requirements?

Choose one answer.

  1. A. Overwrite the current layer version with the fixed code, so that every function picks up the change on its next cold start without any deployment.
  2. B. Publish a new layer version, grant the organization's ID permission to use it, and have each team move to the new version ARN in its own deployment.
  3. C. Make the layer public, so that every account can use it, and have each function reference the latest layer version ARN so that updates arrive automatically.
  4. D. Copy the logging code into each function's deployment package, remove the layer, and let each team control its own releases, since the layer is no longer shared.
Show the answer and explanation

Answer: B

Explanation

Lambda layer versions are immutable, and each one has its own ARN. A layer version permission can grant use to every account in an organization without making the layer public, and each team then points its functions at the new version during its own deployment. Overwriting versions, making the layer public or copying the code each miss a stated requirement.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Lambda deployments (aliases, traffic shifting, SAM)? The 5 full-length practice sets have 7 more Lambda deployments (aliases, traffic shifting, SAM) questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets