aws-cdk.aws-ecr-assets
Docker image assets deployed to ECR
Decision gist · record as of 2026-08-14
No—do not install this package for new projects. AWS CDK v1 reached end-of-support on 2023-06-01 and is no longer being updated. Migrate to AWS CDK v2 instead, which includes the equivalent functionality in `aws-cdk-lib.aws_ecr_assets`. Installing v1 packages exposes you to unpatched security issues and lack of ongoing maintenance.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Docker to be installed and running on the build machine; the target directory must contain a Dockerfile.
- Low install friction with a wheel distribution.
- The package is in active maintenance status but carries a critical caveat: AWS CDK v1 reached end-of-support on 2023-06-01 and is no longer being updated; users should migrate to AWS CDK v2.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions.
last release 2023-06-19 (1152 days) · last repo commit 2026-08-14 · 12,868 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 172,131 downloads/mo, #10,347 on PyPI
Alternatives
Verify before relying
from aws_cdk.aws_ecr_assets import DockerImageAsset
import os
asset = DockerImageAsset(self, "MyImage",
directory=os.path.join(os.path.dirname(__file__), "my-image")
)
image_uri = asset.imageUri- Whether v1 packages continue to receive security patches despite end-of-support status.
- Compatibility and migration effort when upgrading from v1 to v2 in existing CDK applications.
What it is and what it does
This package extends AWS CDK v1 with the ability to package Docker images as first-class assets within your infrastructure-as-code. It handles building images from local Dockerfiles or loading them from tarballs, then automatically uploads them to an AWS-managed ECR repository during deployment. The package integrates with the CDK toolkit and CI/CD pipelines to manage the full lifecycle—from build context preparation (with `.dockerignore` support) through image push and CloudFormation parameter wiring.
The module supports build-time customization via build arguments, target stages, networking modes, and platform selection. Images are referenced in CDK code via `asset.imageUri`, which includes both the ECR URL and tag. Pull permissions are managed through IAM policy grants on the asset's repository, with special handling for cross-account and AWS service consumers.
Use it for
- Build and deploy custom Docker images as part of CDK stacks without manual ECR repository management.
- Package application containers with build arguments and multi-stage Dockerfile targets in infrastructure code.
- Reference built images in CDK constructs for ECS, Lambda, or other AWS services that consume container images.
- Automate image versioning and tagging through CDK asset hashing for consistent deployments across environments.
- Grant pull permissions to ECS tasks, Lambda functions, or cross-account principals via the asset's repository interface.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No—do not install this package for new projects.
AWS CDK v1 reached end-of-support on 2023-06-01 and is no longer being updated. Migrate to AWS CDK v2 instead, which includes the equivalent functionality in `aws-cdk-lib.aws_ecr_assets`. Installing v1 packages exposes you to unpatched security issues and lack of ongoing maintenance.
Install
aws-cdk-aws-ecr-assets on PyPI
Before you install
Low install friction with a wheel distribution. The package is in active maintenance status but carries a critical caveat: AWS CDK v1 reached end-of-support on 2023-06-01 and is no longer being updated; users should migrate to AWS CDK v2.
Requires Docker to be installed and running on the build machine; the target directory must contain a Dockerfile.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions.
Quickstart
from aws_cdk.aws_ecr_assets import DockerImageAsset
import os
asset = DockerImageAsset(self, "MyImage",
directory=os.path.join(os.path.dirname(__file__), "my-image")
)
image_uri = asset.imageUri
Verify before relying
- Whether v1 packages continue to receive security patches despite end-of-support status.
- Compatibility and migration effort when upgrading from v1 to v2 in existing CDK applications.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release ~=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 10 packagesaws-cdk.assetsaws-cdk.aws-ecraws-cdk.aws-iamaws-cdk.aws-s3aws-cdk.coreaws-cdk.cx-apiconstructsjsiipublicationtypeguard |
| Maintenance | Actively maintained 1,152 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 172,131 / month, #10,347 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | 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 |
Evidence: aws_cdk.aws_ecr_assets-1.204.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “docker image cdk assets”
- aws-cdk.aws-ecr-assetsBundles Docker images as AWS CDK assets, building from Dockerfiles or…
- cdk-ecr-deploymentA CDK construct that copies Docker images between registries (ECR,…
- aws-cdk.aws-s3-assetsPackages local files and directories for deployment to S3 as part of…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also aws-cdk.aws-s3-assets · cdk-ecr-deployment · aws-cdk.aws-ecr · aws-cdk.aws-apprunner-alpha · aws-cdk.asset-node-proxy-agent-v6 · aws-cdk.asset-awscli-v1 · aws-cdk.asset-node-proxy-agent-v5 · aws-cdk.aws-s3-deployment · aws-cdk.aws-imagebuilder · aws-cdk.aws-autoscaling-common