Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Create AWS Secrets Manager secrets in AWS Cloud Development Kit (AWS CDK)

Focus mode
Create AWS Secrets Manager secrets in AWS Cloud Development Kit (AWS CDK) - AWS Secrets Manager

To create, manage, and retrieve secrets in a CDK app, you can use the AWS 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 AWS Cloud Development Kit (AWS CDK) v2 Developer Guide.

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.