Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Commit 8c5bc31

Browse files
committed
support new format
1 parent 5b8341d commit 8c5bc31

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ const assumeRole = async config => {
1010
const AWS = require('aws-sdk'); // eslint-disable-line global-require
1111
AWS.config.region = config.provider.region;
1212
const sts = new AWS.STS({ apiVersion: '2011-06-15' });
13-
console.log(`Attempting to assume AWS role ${config.provider.role}`);
13+
console.log(`Attempting to assume AWS role ${config.provider.iam.role}`);
1414
return sts
1515
.assumeRole({
16-
RoleArn: config.provider.role,
16+
RoleArn: config.provider.iam.role,
1717
RoleSessionName: `${config.provider.service}-${
1818
process.env.USER || 'unknown'
1919
}-${Date.now()}`,
@@ -26,11 +26,11 @@ const assumeRole = async config => {
2626
sessionToken: data.Credentials.SessionToken,
2727
});
2828
console.log(
29-
`Assumed AWS role ${config.provider.role} successfully`,
29+
`Assumed AWS role ${config.provider.iam.role} successfully`,
3030
);
3131
})
3232
.catch(err => {
33-
console.error(`Failed to assume ${config.provider.role}`, err);
33+
console.error(`Failed to assume ${config.provider.iam.role}`, err);
3434
throw err;
3535
});
3636
};

0 commit comments

Comments
 (0)