FIX: +200 Meltano - Productboard API

This commit is contained in:
Victor Radael
2022-10-05 16:42:41 -03:00
parent 97d6f914cc
commit 9d732d4a48
7 changed files with 110 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
import {
SecretsManagerClient,
GetSecretValueCommand,
} from '@aws-sdk/client-secrets-manager';
export async function getSecreteFromSecreteManager(path: string) {
const secretsManagerClient = new SecretsManagerClient({});
const getSecretComand = new GetSecretValueCommand({
SecretId: `${path}`,
});
const res = await secretsManagerClient
.send(getSecretComand)
.catch(() => null);
return res?.SecretString;
}