skillfed

aws-cdk.aws-secretsmanager

The CDK Construct Library for AWS::SecretsManager

aws-cdk-aws-secretsmanager v1.204.0 151.5K downloads/30d#10,930 on PyPI12,868
Permissive license Apache-2.0 Active released

What it is and what it does

This is the AWS CDK v1 construct library for AWS Secrets Manager, a service for storing and rotating database credentials, API keys, and other secrets in AWS. It provides Python classes to define secrets as infrastructure-as-code, configure automatic rotation via Lambda functions or hosted rotation for databases like MySQL and PostgreSQL, and grant read/write permissions to IAM roles and principals.

The library integrates with AWS KMS for encryption, supports importing existing secrets by ARN or name, and handles cross-account access through resource and KMS key policies. However, AWS CDK v1 reached end-of-support on 2023-06-01, and the package is no longer being updated; users are directed to migrate to AWS CDK v2.

Use it for:

  • Define and provision database credentials as CDK constructs, with automatic secret generation and KMS encryption.
  • Set up automated secret rotation schedules using custom Lambda functions or AWS-hosted rotation for MySQL, PostgreSQL, Oracle, and other databases.
  • Grant IAM roles and cross-account principals read and write permissions to secrets with automatic KMS key policy updates.
  • Import existing secrets from AWS Secrets Manager by ARN or name into a CDK stack for reference in other constructs.
  • Manage database credential rotation in VPC-deployed environments using hosted rotation with network connectivity rules.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

AWS CDK construct library for provisioning and managing AWS Secrets Manager resources—creating secrets, configuring rotation schedules, and granting access permissions through infrastructure-as-code.

No—do not install. This package is end-of-support as of 2023-06-01 and explicitly deprecated in favor of AWS CDK v2. While it has low install friction and no known vulnerabilities, using an unsupported major version of AWS CDK introduces technical debt and blocks access to bug fixes and security updates. Migrate to aws-cdk-lib.aws_secretsmanager (CDK v2) instead.

Install

aws-cdk-aws-secretsmanager on PyPI

pip

pip install aws-cdk-aws-secretsmanager

uv

uv add aws-cdk-aws-secretsmanager

poetry

poetry add aws-cdk-aws-secretsmanager

Installing aws-cdk.aws-secretsmanager

Before you install

Low install friction with 11 runtime dependencies, all AWS CDK modules and supporting libraries. However, the package is explicitly end-of-support as of 2023-06-01; the description banner states AWS CDK v1 has reached End-of-Support and users should migrate to AWS CDK v2. Active repository maintenance does not offset the deprecated status.

License in practice

Licensed under Apache-2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions—standard for AWS CDK libraries.

Quickstart

pip install aws-cdk.aws-secretsmanager

import aws_cdk.aws_secretsmanager as secretsmanager

secret = secretsmanager.Secret(self, "Secret")
secret.grant_read(role)

Requires AWS CDK v1 environment; v1 is end-of-support as of 2023-06-01 and users should migrate to AWS CDK v2 instead.

Verify before relying

  • Whether AWS CDK v2 equivalent (aws-cdk-lib.aws_secretsmanager) is recommended as a drop-in replacement or requires code changes.
  • Current security patch status and timeline for v1 end-of-life support.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (~=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 11 — aws-cdk.aws-ec2, aws-cdk.aws-iam, aws-cdk.aws-kms, aws-cdk.aws-lambda, aws-cdk.aws-sam, aws-cdk.core, aws-cdk.cx-api, constructs, jsii, publication, typeguard
Maintenance actively maintained — 1,152 days since the last release
Last repo commit
First released
Downloads 151,492/month — #10,930 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aws_cdk.aws_secretsmanager-1.204.0-py3-none-any.whl

Development Status :: 7 - InactiveFramework :: AWS CDKFramework :: AWS CDK :: 1Intended Audience :: DevelopersLicense :: OSI ApprovedOperating System :: OS IndependentProgramming Language :: JavaScriptProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Typing :: Typed

Tags

aws secrets manager cdkinfrastructure as code secretsaws secret rotationcdk construct libraryaws credential managementsecrets provisioning automationiam secret grants
aws-cdkdeprecated-v1infrastructure-as-code

More Build Tools packages