Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ grunt.initConfig({
});
```

### AWS Region
You can store your AWS region in the following environment variable and it will be used if available:

```json
AWS_REGION
```

### AWS Credentials
You should store your AWS credentials outside of source control. They will be loaded from the following environment variables if available:

Expand All @@ -75,6 +82,6 @@ Or you can store them in a git ignored credential file which looks like this:
* May 14, 2013 - __0.1.0__ First release

## License
[Florent Lamoureux](http://twitter.com/flrent)
Licensed under the MIT license.
[Florent Lamoureux](http://twitter.com/flrent)
Licensed under the MIT license.
Copyright (c) 2013 - [http://www.payrollhero.com](PayrollHero.com)
6 changes: 4 additions & 2 deletions tasks/grunt-cloudfront.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ module.exports = function(grunt) {
version = options.version,
data = _.omit(this.data, 'options');

options.credentials = options.credentials || {};
AWS.config.update({
region: options.region,
accessKeyId: (process.env.AWS_ACCESS_KEY_ID || options.credentials.accessKeyId),
secretAccessKey: (process.env.AWS_SECRET_ACCESS_KEY || options.credentials.secretAccessKey),
accessKeyId: options.credentials.accessKeyId,
secretAccessKey: options.credentials.secretAccessKey,
});

var CloudFront = new AWS.CloudFront();

if(!_.isUndefined(version)) {
Expand Down