Emulate EFS locally by mounting a local filesystem
- Dominant language
- Python
- Stars
- 6.7k
- Forks
- 1.2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 52
Description
### Describe your idea/feature/enhancement
I have a lambda function that needs to store short-lived pieces of data, things like token keys for api access or the most-recently-sent notification to an api to prevent spamming users with repetitive messages. This data needs to persist beyond the lifetime of the lambda function.
As I was exploring how to implement this, I read that AWS had recently added support for EFS to lambda, and I wanted to test how that might work in my functions, using the efs filesystem to store data compared to alternatives such as DynamoDB
### Proposal
sam local invoke -e ./events/twitch-webhook.json --filesystem=./efs-tmp/
Things to consider:
1. Will this require any updates to the [SAM Spec](https://github.com/awslabs/serverless-application-model)?
It should not, this is a local invocation feature.
### Additional Details
This is a limited feature that might not fill all customer needs; some customers might prefer to be able to access remote EFS file systems while running their function locally. In this use case simply having a filesystem available is enough. In the use case of running `sam local start-api` to exercise the app's api, the will need to mock out whatever filesystem they depend on locally.
Contributor guide
Assessment
This issue has not been assessed yet.