No results for

Powered byAlgolia

SecretsManagerClient.deleteSecret(secretID, { recoveryWindow: 30, noRecovery: false}})

SecretsManagerClient.deleteSecret deletes a secret from AWS' secrets manager.

secretIDstringThe ARN or name of the secret to update.
options{ recoveryWindow: 30, noRecovery: false }Use options to control the deletion behavior. recoveryWindow defines how long a secret will remain “soft-deleted”, in days, before being hard-deleted. noRecovery set to true would hard-delete the secret immediately. Note that both options are exclusive.


import { AWSConfig, SecretsManagerClient } from '';
const awsConfig = new AWSConfig({
region: __ENV.AWS_REGION,
const secretsManager = new SecretsManagerClient(awsConfig);
const testSecretName = 'jslib-test-secret';
const testSecretValue = 'jslib-test-value';
export default function () {
// Let's make sure our test secret is created
const testSecret = secretsManager.createSecret(
'this is a test secret, delete me.'
// Let's hard delete our test secret and verify it worked
secretsManager.deleteSecret(testSecretName, { noRecovery: true });