The APIs provided by this jslib operate synchronously, which means k6 must wait for operations that use the client classes to finish before proceeding with the rest of the script.Performance considerations and recommended practices
In some cases, such as downloading large files from S3, this could affect performance and test results. To minimize the impact on test performance, we recommend using these operations in thesetup and teardown lifecycle functions. These functions run before and after the test run and thus do not influence test results.
SecretsManagerClient allows interacting with secrets stored in AWS's Secrets Manager. Namely, it allows the user to list, download, create, modify and delete secrets. Note that the SecretsManagerClient operations are blocking, and we recommend reserving their usage to the setup and teardown functions as much as possible.
SecretsManagerClient is included in both the dedicated jslib secrets-manager.js bundle, and the aws.js one, containing all the services clients.
Methods
Function | Description |
---|---|
listSecrets() | List secrets owned by the authenticated user |
getSecret(secretID) | Download a secret |
createSecret(name, secretString, description, [versionID], [tags]) | Create a new secret |
putSecretValue(secretID, secretString, [versionID]) | Update a secret |
deleteSecret(secretID, { recoveryWindow: 30, noRecovery: false}}) | Delete a secret |
Throws
S3 Client methods will throw errors in case of failure.
Error | Condition |
---|---|
InvalidSignatureError | when invalid credentials were provided. |
SecretsManagerServiceError | when AWS replied to the requested operation with an error. |