--- id: aws-cdk-custom-resources version: "1.204.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # aws-cdk.custom-resources — Constructs for implementing CDK custom resources License: permissive · Maintenance: active · Downloads: 155.3K/mo ## 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 above — 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 pip install aws-cdk-custom-resources uv add aws-cdk-custom-resources poetry add aws-cdk-custom-resources ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 155.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cloudformation custom resources, aws cdk custom resources, cdk provider framework, lambda cloudformation integration, cdk lifecycle handlers, custom resource provisioning, asynchronous resource handlers, aws-cdk, cloudformation, end-of-support [View on SkillFed](https://skillfed.io/packages/aws-cdk-custom-resources) · [View on PyPI](https://pypi.org/project/aws-cdk-custom-resources/)