aws-cdk.custom-resources
Constructs for implementing CDK custom resources
What it is and what it does
This package provides a Provider construct that acts as a mini-framework for building AWS CloudFormation custom resources within AWS CDK. It wraps Lambda functions as handlers for CloudFormation lifecycle events (Create, Update, Delete), managing the request/response protocol, error handling, and response submission back to CloudFormation. The framework supports both synchronous handlers (onEvent) that complete immediately and asynchronous handlers (isComplete) that poll until a resource reaches a stable state, useful for operations exceeding Lambda's timeout window.
The package depends on aws-cdk.core, aws-cdk.aws-lambda, aws-cdk.aws-iam, aws-cdk.aws-logs, and several other CDK modules to construct and manage the underlying infrastructure. However, it is important to note that AWS CDK v1 reached end-of-support on 2023-06-01, and this package is no longer being updated. Users should plan migration to AWS CDK v2 rather than starting new projects with this version.
Use it for:
- Implement a custom CloudFormation resource that provisions third-party infrastructure not natively supported by CloudFormation.
- Create a long-running provisioning operation (e.g., database initialization) that requires polling until completion rather than immediate return.
- Build a wrapper around an external API to make it deployable as a CloudFormation custom resource within CDK stacks.
- Handle resource lifecycle events (creation, updates, deletion) with custom business logic before or after standard AWS operations.
- Validate and transform resource properties during CloudFormation deployment using Lambda-based custom logic.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a framework for implementing AWS CloudFormation custom resources using AWS CDK, handling lifecycle events and asynchronous operations through Lambda functions.
No — do not install for new projects. This package is end-of-support (AWS CDK v1 reached end-of-support 2023-06-01) and users are explicitly directed to migrate to AWS CDK v2. Only use if maintaining an existing CDK v1 codebase with no migration path; otherwise, adopt the v2 equivalent to receive updates and security patches.
Install
aws-cdk-custom-resources on PyPI
pip
pip install aws-cdk-custom-resourcesuv
uv add aws-cdk-custom-resourcespoetry
poetry add aws-cdk-custom-resourcesInstalling aws-cdk.custom-resources
Before you install
Low install friction with 11 runtime dependencies. Package is in active maintenance but marked as inactive (Development Status 7) — AWS CDK v1 reached end-of-support on 2023-06-01 and users are advised to migrate to AWS CDK v2.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
from aws_cdk import custom_resources as cr
from aws_cdk import aws_lambda as lambda_
from aws_cdk import aws_iam as iam
from aws_cdk import aws_logs as logs
provider = cr.Provider(self, "MyProvider",
on_event_handler=on_event_function,
is_complete_handler=is_complete_function,
log_retention=logs.RetentionDays.ONE_DAY,
role=my_role
)
Requires AWS CDK v1 runtime environment; package is end-of-support as of 2023-06-01 and migration to AWS CDK v2 is recommended.
Verify before relying
- Whether AWS CDK v2 has a direct replacement for this custom resources module or if migration requires architectural changes.
- Performance characteristics and timeout limits for asynchronous handlers under typical workloads.
- Security implications of Step Functions execution history exposure mentioned in the description for your threat model.
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-cloudformation, aws-cdk.aws-ec2, aws-cdk.aws-iam, aws-cdk.aws-lambda, aws-cdk.aws-logs, aws-cdk.aws-sns, aws-cdk.core, constructs, jsii, publication, typeguard |
| Maintenance | actively maintained — 1,152 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 155,328/month — #10,824 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aws_cdk.custom_resources-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
crhelperSimplifies writing CloudFormation custom…
permissive · top 15,000 on PyPI
aws-cdk.aws-cloudformationDefines AWS CloudFormation resources…
permissive · top 15,000 on PyPI
aws-cdk.coreProvides the core construct classes and stack…
permissive · top 15,000 on PyPI
aws-cdk.aws-imagebuilderProvides AWS CDK L1 constructs for defining and…
permissive · top 15,000 on PyPI
cloudformation-cliA command-line tool for authoring and managing…
permissive · top 15,000 on PyPI
aws-cdk-libProvides Python APIs to define and deploy AWS…
permissive · top 5,000 on PyPI
aws-cdk.aws-autoscaling-hooktargetsProvides integration classes for AWS…
permissive · top 15,000 on PyPI
aws-cdk.aws-samProvides AWS CDK v1 constructs for defining…
permissive · top 15,000 on PyPI
aws-cdk.aws-lambdaDefines AWS Lambda functions and layers as…
permissive · top 15,000 on PyPI
cdktf-cdktf-provider-awsProvides prebuilt Python bindings for the…
copyleft · top 15,000 on PyPI