AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

DatabaseSecret

A database secret.

Import

import { DatabaseSecret } from 'aws-cdk-lib/aws-docdb';

Or use the module namespace:

import * as docdb from 'aws-cdk-lib/aws-docdb';
// docdb.DatabaseSecret

Properties

Configuration passed to the constructor as DatabaseSecretProps.

usernameRequired
string

The username.

encryptionKeyOptional
IKey

The KMS key to use to encrypt the secret.

Default: default master key

excludeCharactersOptional
string

Characters to not include in the generated password.

Default: "\"@/"

masterSecretOptional
ISecret

The master secret which will be used to rotate this secret.

Default: - no master secret information will be included

secretNameOptional
string

The physical name of the secret.

Default: Secretsmanager will generate a physical name for the secret

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter