Secret manger integration doesn't work

Hi Team,

I tried to integrate with aws secret manager but I am getting an error while connecting with aws. Here is the code i have written.

import { AWSConfig, SecretsManagerClient } from 'https://jslib.k6.io/aws/0.7.1/secrets-manager.js';

const awsConfig = new AWSConfig({
  region: 'some-region',
  accessKeyId: 'sample-key',
  secretAccessKey: 'sample-key'
});
const secretsManager = new SecretsManagerClient(awsConfig);
const testSecretName = 'secret-name';
const secret = secretsManager.getSecret(testSecretName);

Hi @aashish

Apologies for the delay on this one, and thanks for reporting the error.

I’m able to reproduce this with the example from the docs as well. Let us have a look and double-check if there is a bug we need to fix or what is going on. We’ll get back to you with our findings as soon as possible.

Cheers!

Hi @aashish

Thanks for reaching out :wave: The SecretsManager was indeed broken in v0.7.1. A nasty little issue in our code handling request signing was the culprit.

We have just published version 0.7.2 of the library, which should be addressing the issue you were experiencing. Could you take it for a spin and let us know if it indeed addressed the issue you were experiencing?

To do so, make sure to import the library using the https://jslib.k6.io/aws/0.7.2 import path.

Thank you :bowing_man:

1 Like