0

I want to write test case for SSM GetParameterCommand request in typescript. My code looks like:

const region = "us-east-1"
const awsSSMClient = new SSMClient({ region })

export async function fetchParam(parameterName: string, decrypt: boolean): Promise<string> {
    const paramconfig = {
        Name: parameterName,
        WithDecryption: decrypt
    }

    const command = new GetParameterCommand(input)
    const parameter: any = await awsSSMClient.send(command)

    return parameter.Parameter.Value
}

Can I use aws-sdk-client-mock? If not can anyone provide me an example?

Thanks

Spartacus
  • 337
  • 4
  • 12

0 Answers0