gulp-s3-upload
Advanced tools
Comparing version 1.4.3 to 1.4.4
# Changelog | ||
## Version 1.4.4 | ||
* Fix parameter name in Readme.md [(issue #27)](http://github.com/clineamb/gulp-s3-upload/issues/27) | ||
* Add an option for config to take `{useIAM:true}` to be explicit | ||
* Upgrade packages (all patch versions) | ||
## Version 1.4.3 | ||
@@ -4,0 +10,0 @@ * Fix issue [issue #26](http://github.com/clineamb/gulp-s3-upload/issues/23) |
12
index.js
@@ -236,2 +236,6 @@ var es = require('event-stream') | ||
if(_.isUndefined(config)) { | ||
config = {}; | ||
} | ||
// Maintain backwards compatibility with legacy key and secret options | ||
@@ -246,2 +250,8 @@ if(config.key) { | ||
// If using IAM | ||
if(_.has(config, 'useIAM') && config.useIAM) { | ||
config = {}; | ||
} | ||
// Intentionally not mandating the accessKeyId and secretAccessKey as they | ||
@@ -268,5 +278,5 @@ // will be loaded automatically by the SDK from either environment variables | ||
AWS.config.update(_.extend(config, aws_config)); | ||
AWS.config.update(_.extend({}, config, aws_config)); | ||
return gulpPrefixer(AWS, s3_config); | ||
}; |
{ | ||
"name": "gulp-s3-upload", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"description": "A gulp task to asynchronous upload/update assets to an AWS S3 Bucket.", | ||
@@ -29,5 +29,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"aws-sdk": "2.2.6", | ||
"event-stream": "^3.3.1", | ||
"gulp-util": "^3.0.6", | ||
"aws-sdk": "2.2.11", | ||
"event-stream": "^3.3.2", | ||
"gulp-util": "^3.0.7", | ||
"hasha": "^2.0.2", | ||
@@ -34,0 +34,0 @@ "https-proxy-agent": "^1.0.0", |
# gulp-s3-upload | ||
__Version 1.4.3__ | ||
__Version 1.4.4__ | ||
@@ -31,3 +31,3 @@ Use for uploading assets to Amazon S3 servers. | ||
accessKeyId: "YOURACCESSKEY", | ||
accessKeySecret: "YOUACCESSSECRET" | ||
secretAccessKey: "YOUACCESSSECRET" | ||
} | ||
@@ -39,8 +39,21 @@ | ||
// ...or to use IAM settings... | ||
var config = { useIAM: true }; | ||
// ...or to use IAM w/ S3 config settings ... | ||
var s3 = require('gulp-s3-upload')( | ||
{useIAM:true}, // or {} / null | ||
{ /* S3 Config */ } | ||
); | ||
``` | ||
The optional `config` argument can include any option available (like `region`) available in the [AWS Config Constructor](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#constructor-property). By default all settings are undefined. | ||
The optional `config` argument can include any option available (like `region`) available in the [AWS Config Constructor](http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Config.html#constructor-property). By default all settings are undefined. | ||
**Per AWS best practices**, the recommended approach for loading credentials is to use the shared credentials file (`~/.aws/credentials`). You can also set the `aws_access_key_id` and `aws_secret_access_key` environment variables or specify values directly in the gulpfile via the `accessKeyId` and `secretAccessKey` options. If you have multiple profiles configured in your AWS credentials file, you can specify the profile name inline with the call to gulp. | ||
If you are using **IAM** settings, just pass the noted config above in order to default to using IAM. More information on using [IAM settings here](https://aws.amazon.com/documentation/iam/). | ||
```sh | ||
@@ -47,0 +60,0 @@ AWS_PROFILE=myprofile gulp |
30195
241
351
+ Addedaws-sdk@2.2.11(transitive)
- Removedaws-sdk@2.2.6(transitive)
Updatedaws-sdk@2.2.11
Updatedevent-stream@^3.3.2
Updatedgulp-util@^3.0.7