DVA-C02 Troubleshooting and optimization

A Java function on Lambda shows multi-second cold starts after each deployment. Which change most directly reduces the initialization time?

Show answer and explanation

Answer: A

SnapStart for Java takes a snapshot of an initialized execution environment when a version is published, then restores from that snapshot when new environments are needed. That removes most of the initialization work from the cold-start path. Timeouts only set how long a run may take, multi-Region copies add operational cost without faster initialization, and extra bundled libraries increase the package the runtime must load.

Why the other options are wrong

  • B. A longer timeout only allows slow runs to continue longer. It does not shorten the initialization phase, so the cold start stays the same length.
  • C. Regional copies spread traffic, but each copy still cold-starts on its own. The initialization cost is unchanged, so the approach adds complexity without solving the problem.
  • D. Bundling unused libraries enlarges the deployment package and adds class-loading work. That tends to lengthen cold starts rather than reduce them.

Exam tip. For Java cold starts, SnapStart on published versions plus a slimmer dependency set are the first levers.

Keep going. 200 DVA-C02 questions, answers explained after each one.

Practise this domain

Reviewed November 2026. Spotted a problem with this question? Report it from the practice tool.