1.3.1 • Published 4 years ago
@felixdulfer/s3-upload v1.3.1
s3-upload
Simple Amazon S3 upload CLI tool.
Prerequisites
- Node
- AWS S3 Credentials (TODO: Link to AWS CLI/env var setup)
Usage
Create a YAML manifest
Example manifest.yaml:
entry:
manifest:
- glob:
pattern: "*.html"
options:
cwd: dist
s3:
Bucket: my-bucket
ACL: public-read
CacheControl: "public, max-age: 60"
StorageClass: REDUCED_REDUNDANCYAny yaml is OK, as long as yaml supports it. This includes the use of anchors.
Upload
$ s3-upload manifest.yamlIf you want to use a different AWS Profile that is configured in ~/.aws/, then
simply pass the name of the profile along using environment variables:
$ AWS_PROFILE=my-profile s3-upload manifest.yamlEnvironment variables
Environment variables in the yaml manifest will be replaced.
entry:
manifest:
- glob:
...
s3:
Bucket: ${MY_BUCKET}
...Deploying new versions
$ np