Skip to content

Deprecate keep_warm in favor of AWS-native cold start solutions #1451

@monkut

Description

@monkut

Summary

The keep_warm feature should be deprecated in favor of AWS-native cold start solutions (SnapStart, Provisioned Concurrency).

Rationale

Investigation in #1445 confirmed that keep_warm:

  • Does not improve cold start duration — init times are identical (~1,020-1,080ms) with or without keep_warm
  • Only reduces cold start frequency by keeping one execution environment alive via CloudWatch pings
  • Only keeps 1 environment warm — concurrent requests still hit full cold starts
  • Costs ~$0.05/month for marginal benefit

AWS-native solutions are superior:

Solution Cold Start Reduction Cost
keep_warm 0% (same duration) ~$0.05/mo
SnapStart 45-72% faster ~$1.95/mo
Provisioned Concurrency 100% eliminated ~$5.40/mo

Proposed Changes

  1. Add deprecation warning when keep_warm is enabled — log a warning during deploy and update recommending SnapStart or Provisioned Concurrency
  2. Change default from keep_warm: true to keep_warm: false
  3. Update documentation to recommend SnapStart and Provisioned Concurrency as primary cold start solutions
  4. Keep the feature functional for users who explicitly opt in — full removal in a future major version

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions