Optionally get access and secret keys from AWS CLI configuration

This commit is contained in:
Bill Garrett
2017-06-07 10:51:13 -07:00
parent af5b101444
commit df134f3389
3 changed files with 24 additions and 0 deletions

View File

@@ -19,10 +19,18 @@ deploy:
bucket: <S3 bucket>
aws_key: <AWS id key> // Optional, if the environment variable `AWS_ACCESS_KEY_ID` is set
aws_secret: <AWS secret key> // Optional, if the environment variable `AWS_SECRET_ACCESS_KEY` is set
aws_cli_profile: <an AWS CLI profile name, e.g. 'default'> // Optional
concurrency: <number of connections> // Optional
region: <region> // Optional, see https://github.com/LearnBoost/knox#region
headers: <headers in JSON format> // pass any headers to S3, usefull for metadata cache setting of Hexo assets
```
If you installed the AWS command-line tool and provided your credentials via `aws configure`,
you can re-use those credentials. Specify a value for `aws_cli_profile`, such as "default",
and leave `aws_key`, `aws_secret`, and `region` blank.
If you provide key, secret, and/or region explicitly or via the environment,
they will override what's in your AWS CLI profile.
#### Example: header Cache-Control
``` yaml