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:
- Navigate to SAM application directory (/sam-app)
- 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
- OS: Linux Ubuntu
sam --version: 1.146.0
- 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.
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:
sam local start-api --port 8181 --docker-network sam-dynamodb --env-vars /test_environment_dynamodb.json --debugObserved 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:
aws-sam-cli/samcli/lib/constants.py
Line 1 in 463f1bc
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
sam --version: 1.146.0Output sam --info
Output docker version
Important to share, if I downgrade to sam version to 1.145.1, I don't face this issue.