Create Amazon Secrets Manager secrets in Amazon Cloud Development Kit (Amazon CDK) - Amazon Secrets Manager
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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.