From 07a6aede9281024ac58d737afb6560fd45112d8f Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Mon, 23 Sep 2024 22:49:32 +0400 Subject: [PATCH] Update util.ts --- src/custom/util.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/custom/util.ts b/src/custom/util.ts index c7be35b..d3e5b86 100644 --- a/src/custom/util.ts +++ b/src/custom/util.ts @@ -9,9 +9,7 @@ export const getAwsRegion = async () => { } try { - const timeout = 1000; - - const tokenRes = await axios.put(AWS_TOKEN_METADATA_URI, { + const tokenRes = await axios.put(AWS_TOKEN_METADATA_URI, undefined, { headers: { "X-aws-ec2-metadata-token-ttl-seconds": "21600" }, @@ -23,7 +21,7 @@ export const getAwsRegion = async () => { "X-aws-ec2-metadata-token": tokenRes.data, Accept: "application/json" }, - timeout: timeout + timeout: 5_000 }); return identityResponse.data.region;