aws / aws-sam-cli

CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
https://aws.amazon.com/serverless/sam/
Apache License 2.0
6.49k stars 1.17k forks source link

local invoke options for users without root Docker access? #6801

Closed kaitlinchaung closed 4 months ago

kaitlinchaung commented 6 months ago

Description:

I am working on a server where I only have sudo access to Docker. When I try to use sam local invoke, I get an error message.

Observed result:

Error: Running AWS SAM projects locally requires Docker. Have you got it installed and running?

Steps to reproduce:

I was trying to locally invoke the Python3.12 HelloWorld example.

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: linux-gnu
  2. sam --version: SAM CLI, version 1.111.0
  3. AWS region: us-east-1
$ sam --info
{
  "version": "1.111.0",
  "system": {
    "python": "3.11.3",
    "os": "Linux-6.5.0-1014-aws-x86_64-with-glibc2.35"
  },
  "additional_dependencies": {
    "docker_engine": "Not available",
    "aws_cdk": "Not available",
    "terraform": "Not available"
  },
  "available_beta_feature_env_vars": [
    "SAM_CLI_BETA_FEATURES",
    "SAM_CLI_BETA_BUILD_PERFORMANCE",
    "SAM_CLI_BETA_TERRAFORM_SUPPORT",
    "SAM_CLI_BETA_RUST_CARGO_LAMBDA"
  ]
}
sidhujus commented 5 months ago

Hi thanks for reporting this issue! Could you try following the steps from the discussion here and see if that fixes the issue for you? https://github.com/aws/aws-sam-cli/issues/5059

hnnasit commented 4 months ago

Hi @kaitlinchaung, does @sidhujus' suggestion help resolve the issue?

mildaniel commented 4 months ago

Closing due to inactivity.

github-actions[bot] commented 4 months ago

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.