aws / aws/aws-sam-cli

SAM local volume mapping

Open
#3,984 4 comments 1 reaction 0 assignees View on GitHub
blocked/more-info-needed maintainer/need-followup type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Problem : sam local doesn't support docker volume mapping
Ex: Application has to read files on host machine. The host file location should be accessible to the application running in sam container. Currently there is no available option. The equivalent of this is -v in docker.

sam supports -v ( docker-volume-basedir ) but as per the [spec ](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-local-start-api.html)is only for AWS SAM file.

"The location of the base directory where the AWS SAM file exists. If Docker is running on a remote machine, you must mount the path where the AWS SAM file exists on the Docker machine, and modify this value to match the remote machine"

### Proposal

Tool built on top of underlying software should support the native options. For example : sam should honor docker options on top of sam options.

Things to consider:
[ ] The [SAM documentation](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification.html) will need to be updated

### Additional Details

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.