AWS Fundamentals Logo
AWS Fundamentals

Amazon ECS

25 CDK constructs available in aws-cdk-lib/aws-ecs

import * as ecs from 'aws-cdk-lib/aws-ecs';

L2 Constructs15

Higher-level abstractions with sensible defaults and convenience methods.

AsgCapacityProvider

L2

An Auto Scaling Group Capacity Provider. This allows an ECS cluster to target a specific EC2 Auto Scaling Group for the placement of tasks. Optionally (and recommended), ECS can manage the number of instances in the ASG to fit the tasks, and can ensure that instances are not prematurely terminated while there are still tasks running on them.

Cluster

L2

A regional grouping of one or more container instances on which you can run tasks and services.

ContainerDefinition

L2

A container definition is used in a task definition to describe the containers that are launched as part of a task.

Ec2Service

L2

This creates a service using the EC2 launch type on an ECS cluster.

Ec2TaskDefinition

L2

The details of a task definition run on an EC2 cluster.

ExternalService

L2

This creates a service using the External launch type on an ECS cluster.

ExternalTaskDefinition

L2

The details of a task definition run on an External cluster.

FargateService

L2

This creates a service using the Fargate launch type on an ECS cluster. Can also be used with Managed Instances compatible task definitions when using capacity provider strategies.

FargateTaskDefinition

L2

The details of a task definition run on a Fargate cluster.

FirelensLogRouter

L2

Firelens log router.

LinuxParameters

L2

Linux-specific options that are applied to the container.

ManagedInstancesCapacityProvider

L2

A Managed Instances Capacity Provider. This allows an ECS cluster to use Managed Instances for task placement with managed infrastructure.

ScalableTaskCount

L2

The scalable attribute representing task count.

ServiceManagedVolume

L2

Represents a service-managed volume and always configured at launch.

TaskDefinition

L2

The base class for all task definitions.

L1 Constructs10

Direct CloudFormation resource mappings. One-to-one with CloudFormation resource types.

Get the Amazon ECS Cheat Sheet

Everything you need to know about Amazon ECS on one page. HD quality, print-friendly.

Download Free Infographic

Quick Facts

L2 Constructs15
L1 Constructs10
Moduleaws-cdk-lib/aws-ecs