From 7b66ae649faf9761013d02c7fa607aa6fc586ba6 Mon Sep 17 00:00:00 2001 From: Clare Liguori Date: Wed, 18 Mar 2020 13:18:57 -0700 Subject: [PATCH] fix: let the AWS SDK determine the STS regional endpoint --- index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/index.js b/index.js index 3efaab2fe..09abb26c6 100644 --- a/index.js +++ b/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 }); }