Skip to content

Commit

Permalink
fix: Use client + command as recommended at https://aws.amazon.com/bl…
Browse files Browse the repository at this point in the history
  • Loading branch information
markusl committed Aug 29, 2021
1 parent c174dc5 commit b9e5b96
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bitbucket.ts
Original file line number Diff line number Diff line change
@@ -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;
}
Expand Down

0 comments on commit b9e5b96

Please sign in to comment.