mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-06-08 09:17:06 +00:00
fix: let the AWS SDK determine the STS regional endpoint (#48)
This commit is contained in:
parent
a633ed5e02
commit
fc72bd38db
1 changed files with 1 additions and 3 deletions
4
index.js
4
index.js
|
|
@ -1,7 +1,6 @@
|
|||
const core = require('@actions/core');
|
||||
const aws = require('aws-sdk');
|
||||
const assert = require('assert');
|
||||
const util = require('util');
|
||||
|
||||
// The max time that a GitHub action is allowed to run is 6 hours.
|
||||
// That seems like a reasonable default to use if no role duration is defined.
|
||||
|
|
@ -131,10 +130,9 @@ async function exportAccountId(maskAccountId, region) {
|
|||
}
|
||||
|
||||
function getStsClient(region) {
|
||||
const endpoint = util.format('https://sts.%s.amazonaws.com', region);
|
||||
return new aws.STS({
|
||||
region,
|
||||
endpoint,
|
||||
stsRegionalEndpoints: 'regional',
|
||||
customUserAgent: USER_AGENT
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue