From b9e5b96f3ae4b6ab1f0b7c42e1618c345d224167 Mon Sep 17 00:00:00 2001 From: Markus Lindqvist Date: Sun, 29 Aug 2021 13:28:17 +0300 Subject: [PATCH] fix: Use client + command as recommended at https://aws.amazon.com/blogs/developer/modular-packages-in-aws-sdk-for-javascript/ --- src/bitbucket.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bitbucket.ts b/src/bitbucket.ts index 932786b..2729527 100644 --- a/src/bitbucket.ts +++ b/src/bitbucket.ts @@ -1,10 +1,10 @@ -import * as AWS from '@aws-sdk/client-ssm'; +import * as SSM from '@aws-sdk/client-ssm'; import fetch from 'node-fetch'; -const ssm = new AWS.SSM({}); +const ssm = new SSM.SSMClient({}); export const getToken = async (Name: string) => { - const result = await ssm.getParameter({ Name, WithDecryption: true }); + const result = await ssm.send(new SSM.GetParameterCommand({ Name, WithDecryption: true })); if (result.Parameter && result.Parameter.Value) { return result.Parameter?.Value; }