DVA-C02 - Development with AWS Services (32% of the exam) - Section 1.5

Configure AWS Lambda functions by setting memory, timeout, runtime, handler, layers, extensions, environment variables and concurrency for correct behaviour.

Configure AWS Lambda functions by setting memory, timeout, runtime, handler path, layers, extensions, and environment variables to control their behaviour. Distinguish reserved concurrency from provisioned concurrency and understand how each setting affects cold starts and throttling.

AWS LambdaReserved concurrencyLambda layersEnvironment variables

Practice question for this objective

Free sampleDevelopment with AWS Serviceshard

A latency-sensitive Lambda function behind a synchronous API shows high p99 latency caused by cold starts during traffic bursts. The team must reduce the number and duration of cold starts using Lambda configuration, and they accept paying for warmed capacity. Which TWO configuration changes directly reduce cold starts for this function? (Select TWO.)

  • AConfigure provisioned concurrency on the function alias the API points to so a set number of execution environments are initialised and kept warm. Correct
  • BIncrease the function timeout from 30 seconds to 300 seconds so each invocation has more time to finish.
  • CRaise the memory allocation, which proportionally increases the CPU available during the initialisation phase and shortens cold-start duration. Correct
  • DSet a higher reserved concurrency limit on the function so more environments are available during the burst.
  • EMove large dependencies into a Lambda layer so the deployment package is smaller and downloads more quickly.
Reducing Lambda cold starts comes from pre-warming environments with provisioned concurrency and from raising memory to gain faster CPU during initialisation. Cold starts are the init phase that runs before the handler. Provisioned concurrency keeps initialised environments ready so invocations skip init entirely, and because Lambda scales CPU in proportion to allocated memory, a higher memory setting shortens the init work itself. Timeout, reserved concurrency, and layer packaging do not pre-initialise environments.

Why A is correct: Provisioned concurrency pre-initialises execution environments before invocations arrive, so requests skip the init phase that causes cold starts.

Why B is wrong: Tempting because timeout is a runtime setting, but timeout governs how long a running invocation may take and does nothing to remove the init delay of a cold start.

Why C is correct: Memory is the proportional CPU lever in Lambda; more CPU during init runs the runtime and handler setup faster, cutting cold-start duration.

Why D is wrong: Reserved concurrency only caps and guarantees a share of concurrency; it does not pre-warm any environment, so the first invocation in each new environment still cold-starts.

Why E is wrong: A layer is still downloaded and unpacked into the same environment at init, so total code to initialise is unchanged and cold-start time is not meaningfully reduced.

See more DVA-C02 practice questions, answers explained.

Exam traps in Development with AWS Services

Answers that look right on this material and are not. Each one is a distractor from a different question in the DVA-C02 bank for this domain.

  • Compress all the settings into a single base64 environment variable and have the function decode it at startup to stay under the size limit.

    Why it is wrong: Encoding still counts toward the same total environment variable size limit and only delays the failure, while adding decode complexity without solving the underlying limit.

  • Set the handler to app.py.process_event so Lambda can locate the file by its full filename and then the function inside it.

    Why it is wrong: Including the .py extension is a common mistake; Lambda imports the module by name without the extension, so app.py.process_event fails to resolve the module.

  • Keep the direct chain but add an Amazon SQS queue between each Lambda function so failed steps retry and compensation logic stays inside each function.

    Why it is wrong: Queues between steps add buffering and decoupling and look helpful, but the branching, ordering, and compensation still live as hand-coded logic in every function.

Examworthy is not affiliated with or endorsed by Amazon Web Services. Original, blueprint-aligned practice material only.