aws4 with assume role
npm install aws4-with-assume-roleaws4 with assume role.
```
npm i aws4-with-assume-role
` javascript
const { makeSigner } = require('aws4-with-assume-role');
makeSigner({
profile: 'my_profile',
region: 'us-west-2',
}, (err, sign) => {
if (err) {
return callback(err);
}
/*
* Make a signed request options with credentials of 'my_profile'.
*/
const requestOptions = sign({
service: 's3',
path: '/',
signQuery: true,
});
});
`
- options.profileoptions.region
- A name of a profile that gets a credential.
- callback(err, sign)`
- A target region to which an request calls.
-
- A function that is called when a signer function has made or an error occurs.
MIT