--- id: aws-cdk-aws-ecs version: "1.204.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # aws-cdk.aws-ecs — The CDK Construct Library for AWS::ECS License: permissive · Maintenance: active · Downloads: 147.1K/mo ## What it is and what it does This package is the AWS CDK v1 construct library for Amazon ECS, providing high-level Python abstractions to define container clusters, task definitions, and services. It supports three launch modes: EC2 instances under your control, AWS Fargate for fully managed tasks, and ECS Anywhere for self-managed infrastructure. You use it to declare ECS infrastructure as code within a CDK application, specifying cluster capacity, container images, memory and CPU limits, networking modes, and load balancer attachments. The library handles the underlying CloudFormation generation and integrates with other AWS CDK modules (EC2, IAM, CloudWatch, load balancers, service discovery, and more) to build complete container deployments. However, AWS CDK v1 reached end-of-support on 2023-06-01 and is no longer receiving updates—the project recommends migrating to AWS CDK v2 for new work. Use it for: - Define an ECS cluster with EC2 capacity and deploy containerized services using infrastructure-as-code. - Create Fargate task definitions and services for serverless container workloads without managing EC2 instances. - Set up ECS Anywhere tasks to run containers on self-managed infrastructure while using AWS ECS orchestration. - Integrate container deployments with load balancers, auto-scaling, and CloudWatch monitoring in a single CDK stack. - Import and reference existing ECS clusters by ARN to add new services or update capacity programmatically. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides AWS CDK constructs for defining and managing Amazon ECS clusters, task definitions, and services across EC2, Fargate, and ECS Anywhere launch types. No—do not install for new projects. This is AWS CDK v1, which reached end-of-support on 2023-06-01 and is no longer being updated. AWS explicitly recommends migrating to AWS CDK v2. Install only if you are maintaining legacy v1 code that cannot yet be upgraded. ## Install pip install aws-cdk-aws-ecs uv add aws-cdk-aws-ecs poetry add aws-cdk-aws-ecs ## Installing aws-cdk.aws-ecs Before you install: Low install friction with a pure-Python wheel. However, this is AWS CDK v1, which reached end-of-support on 2023-06-01 and is no longer being updated—users should migrate to AWS CDK v2 instead. License in practice: Apache-2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install aws-cdk.aws-ecs from aws_cdk import aws_ecs as ecs from aws_cdk import aws_ec2 as ec2 cluster = ecs.Cluster(self, "Cluster", vpc=vpc) cluster.add_capacity("DefaultAutoScalingGroupCapacity", instance_type=ec2.InstanceType("t2.xlarge"), desired_capacity=3 ) Requires AWS CDK v1 environment and Python 3.7 or later; AWS CDK v1 is end-of-support as of 2023-06-01. Verify before relying: - Whether existing v1 code will continue to function without breaking changes in future Python or AWS SDK updates. - Support timeline and security patch policy for v1 after end-of-support date. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 147.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ECS cluster infrastructure as code, AWS CDK container orchestration, Fargate task definition constructs, EC2 container service deployment, ECS service management CDK, end-of-support, infrastructure-as-code, aws-cdk-v1 [View on SkillFed](https://skillfed.io/packages/aws-cdk-aws-ecs) · [View on PyPI](https://pypi.org/project/aws-cdk-aws-ecs/)