serverless / serverless/serverless
S3 _Files_ for Configuration Feature Proposal
Open
@aloof-ruf is already working on this.
Since Apr 12, 2021.
cat/variable
needs feedback
- Dominant language
- JavaScript
- Stars
- 46.9k
- Forks
- 5.7k
- Avg merge
- 10h 7m
- Merged PRs (30d)
- 57
Description
Feature Proposal: S3 files for configuration
Description
It is possible to grab individual attributes from S3 Objects but I would find it more convenient to grab entire JSON/YAML files from a single S3 Object. This would be an imitation of the ${file} behaviour. For example, instead of having...
# ...
functions:
api:
handler: something.api
environment:
ARG1: ${s3:my-bucket/${opt:deploy-env}/ARG1}
ARG2: ${s3:my-bucket/${opt:deploy-env}/ARG2}
ARG3: ${s3:my-bucket/${opt:deploy-env}/ARG3}
ARG4: ${s3:my-bucket/${opt:deploy-env}/ARG4}
events:
- http:
path: /something
method: post
# ...
It would be handy to go like...
# ...
functions:
api:
handler: something.api
environment: ${s3file:my-bucket/${opt:deploy-env}}
events:
- http:
path: /something
method: post
# ...
Where the S3 Object being loaded is a JSON or YAML file. This behaviour is already available for local JSON/YAML files and I find it convenient. It would also clean up things in an S3 bucket providing those configurations.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.