Skip to content

Commit fc72bd3

Browse files
authored
fix: let the AWS SDK determine the STS regional endpoint (#48)
1 parent a633ed5 commit fc72bd3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

index.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const core = require('@actions/core');
22
const aws = require('aws-sdk');
33
const assert = require('assert');
4-
const util = require('util');
54

65
// The max time that a GitHub action is allowed to run is 6 hours.
76
// That seems like a reasonable default to use if no role duration is defined.
@@ -131,10 +130,9 @@ async function exportAccountId(maskAccountId, region) {
131130
}
132131

133132
function getStsClient(region) {
134-
const endpoint = util.format('https://sts.%s.amazonaws.com', region);
135133
return new aws.STS({
136134
region,
137-
endpoint,
135+
stsRegionalEndpoints: 'regional',
138136
customUserAgent: USER_AGENT
139137
});
140138
}

0 commit comments

Comments
 (0)