File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,12 @@ The AWS secret for the user that has the ability to upload to the `bucket`. This
7676
7777* Default:* ` undefined `
7878
79+ ### profile
80+
81+ The AWS profile as definied in ~ /.aws/credentials. If this is left undefined, the normal [ AWS SDK credential resolution] [ 7 ] will take place.
82+
83+ * Default:* ` undefined `
84+
7985### bucket (` required ` )
8086
8187The AWS bucket that the files will be uploaded to.
Original file line number Diff line number Diff line change @@ -29,8 +29,15 @@ module.exports = CoreObject.extend({
2929 this . _super ( ) ;
3030 var plugin = options . plugin ;
3131 var config = plugin . pluginConfig ;
32+ var profile = plugin . readConfig ( 'profile' ) ;
3233
3334 this . _plugin = plugin ;
35+
36+ if ( profile && ! this . _plugin . readConfig ( 's3Client' ) ) {
37+ this . _plugin . log ( 'Using AWS profile from config' , { verbose : true } ) ;
38+ AWS . config . credentials = new AWS . SharedIniFileCredentials ( { profile : profile } ) ;
39+ }
40+
3441 this . _client = plugin . readConfig ( 's3Client' ) || new AWS . S3 ( config ) ;
3542 } ,
3643
You can’t perform that action at this time.
0 commit comments