Comparing version
@@ -9,2 +9,12 @@ #!/usr/bin/env node | ||
}); | ||
exports.awsConfig = undefined; | ||
var _awsSdk = require('aws-sdk'); | ||
Object.defineProperty(exports, 'awsConfig', { | ||
enumerable: true, | ||
get: function get() { | ||
return _awsSdk.config; | ||
} | ||
}); | ||
exports.assumeRole = assumeRole; | ||
@@ -15,4 +25,2 @@ exports.getProfile = getProfile; | ||
var _awsSdk = require('aws-sdk'); | ||
var _path = require('path'); | ||
@@ -19,0 +27,0 @@ |
{ | ||
"name": "aws-assume", | ||
"description": "Generate teporary credentials for aws assumed roles.", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"author": "Jonathan Brumley <cayasso@gmail.com>", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -34,11 +34,18 @@ # aws-assume | ||
```javascript | ||
import {assumeRole, getProfile} from 'aws-assume' | ||
import {assumeRole, getProfile, awsConfig} from 'aws-assume' | ||
import AWS from 'aws-sdk' | ||
... | ||
// aws-assume exposes the AWS SDK global configuration object | ||
// so you can customize details such as proxies, loggers and retry options | ||
awsConfig.update({ | ||
httpOptions: { | ||
agent: myProxy | ||
} | ||
}); | ||
assumeRole(getProfile()) | ||
.then(credentials => { | ||
AWS.config.credentials = credentials | ||
// ... | ||
AWS.config.credentials = credentials | ||
// ... | ||
}) | ||
@@ -45,0 +52,0 @@ ``` |
83416
0.42%93
8.14%120
6.19%7
-12.5%