Skip to content

Bug: Error: Running AWS SAM projects locally requires a container runtime. Do you have Docker or Finch installed and running? #8430

Description

@nicolastarzia

Description:

SAM local start-api fails with container runtime error despite attempting to use Docker. The command exits with "Running AWS SAM projects locally requires a container runtime. Do you have Docker or Finch installed and running?"

Steps to reproduce:

  1. Navigate to SAM application directory (/sam-app)
  2. Run command: sam local start-api --port 8181 --docker-network sam-dynamodb --env-vars /test_environment_dynamodb.json --debug

Observed result:

2025-11-13 03:15:46,744 | DockerContainerClient created successfully
2025-11-13 03:15:46,748 | Container daemon availability check failed: 400 Client Error for http+docker://localhost/v1.35/_ping: Bad Request ("client version 1.35 is too old. Minimum supported API version is 1.44, please upgrade your client to a newer version")
2025-11-13 03:15:46,749 | Docker client not created, trying creating Finch client.
2025-11-13 03:15:46,752 | Container daemon availability check failed: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
2025-11-13 03:15:46,752 | No container runtime available
Error: Running AWS SAM projects locally requires a container runtime. Do you have Docker or Finch installed and running?

Looks like it was introduced here:

DOCKER_MIN_API_VERSION = "1.35"

Expected result:

SAM local API should start successfully on port 8181 with the specified Docker network and environment variables, allowing local testing of the serverless application.

Additional environment details

  1. OS: Linux Ubuntu
  2. sam --version: 1.146.0
  3. Container engine: Docker

Output sam --info

{
  "version": "1.146.0",
  "system": {
    "python": "3.11.10",
    "os": "Linux-6.14.0-1015-aws-x86_64-with-glibc2.39"
  },
  "additional_dependencies": {
    "container_engine": "Not available",
    "aws_cdk": "2.1031.2 (build 779352d)",
    "terraform": "1.13.5"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_PACKAGE_PERFORMANCE",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}

Output docker version

Client: Docker Engine - Community
 Version:           29.0.0
 API version:       1.52
 Go version:        go1.25.4
 Git commit:        3d4129b
 Built:             Mon Nov 10 21:46:31 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          29.0.0
  API version:      1.52 (minimum version 1.44)
  Go version:       go1.25.4
  Git commit:       d105562
  Built:            Mon Nov 10 21:46:31 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v2.1.5
  GitCommit:        fcd43222d6b07379a4be9786bda52438f0dd16a1
 runc:
  Version:          1.3.3
  GitCommit:        v1.3.3-0-gd842d771
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Important to share, if I downgrade to sam version to 1.145.1, I don't face this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    stage/needs-triageAutomatically applied to new issues and PRs, indicating they haven't been looked at.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions