aws-cdk.aws-secretsmanager
The CDK Construct Library for AWS::SecretsManager
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-secretsmanageruv
uv add aws-cdk-aws-secretsmanagerpoetry
poetry add aws-cdk-aws-secretsmanagerInstalling 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
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
aws-cdk.aws-kmsProvides AWS CDK constructs for defining and…
permissive · top 15,000 on PyPI
aws-secretsmanager-cachingCaches AWS Secrets Manager secrets in-process…
permissive · top 5,000 on PyPI
credstashCredStash stores and retrieves secrets using…
permissive · top 15,000 on PyPI
aws-cdk.aws-ssmProvides CDK constructs for defining AWS…
permissive · top 15,000 on PyPI
aws-cdk.aws-iamProvides Python constructs for defining AWS IAM…
permissive · top 15,000 on PyPI
cerberus-python-clientA Python client library for reading and writing…
permissive · top 5,000 on PyPI
aws-cdk.aws-ecrProvides AWS CDK constructs for defining,…
permissive · top 15,000 on PyPI
aws-cdk.aws-dynamodbProvides AWS CDK constructs for defining,…
permissive · top 15,000 on PyPI
aws-cdk.aws-s3Defines AWS S3 buckets and related resources as…
permissive · top 15,000 on PyPI
aws-cdk.region-infoProvides a queryable database of AWS…
permissive · top 15,000 on PyPI