Create Amazon Secrets Manager secrets in Amazon Cloud Development Kit (Amazon CDK)
To create, manage, and retrieve secrets in a CDK app, you can use the Amazon Secrets Manager Construct Library, which contains ResourcePolicy
, RotationSchedule
, Secret
, SecretRotation
, and SecretTargetAttachment
constructs.
A good practice for using secrets in CDK applications is to first create the secret by using console or the CLI, and then import the secret into your CDK application.
For examples, see:
For more information about the CDK, see the Amazon Cloud Development Kit (Amazon CDK) v2 Developer Guide.