

This is the new *CloudFormation Template Reference Guide*. Please update your bookmarks and links. For help getting started with CloudFormation, see the [AWS CloudFormation User Guide](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html).

# Amazon ECS
<a name="AWS_ECS"></a>

**Resource types**
+ [AWS::ECS::CapacityProvider](aws-resource-ecs-capacityprovider.md)
+ [AWS::ECS::Cluster](aws-resource-ecs-cluster.md)
+ [AWS::ECS::ClusterCapacityProviderAssociations](aws-resource-ecs-clustercapacityproviderassociations.md)
+ [AWS::ECS::Daemon](aws-resource-ecs-daemon.md)
+ [AWS::ECS::DaemonTaskDefinition](aws-resource-ecs-daemontaskdefinition.md)
+ [AWS::ECS::ExpressGatewayService](aws-resource-ecs-expressgatewayservice.md)
+ [AWS::ECS::PrimaryTaskSet](aws-resource-ecs-primarytaskset.md)
+ [AWS::ECS::Service](aws-resource-ecs-service.md)
+ [AWS::ECS::TaskDefinition](aws-resource-ecs-taskdefinition.md)
+ [AWS::ECS::TaskSet](aws-resource-ecs-taskset.md)

# AWS::ECS::CapacityProvider
<a name="aws-resource-ecs-capacityprovider"></a>

Creates a capacity provider. Capacity providers are associated with a cluster and are used in capacity provider strategies to facilitate cluster auto scaling. You can create capacity providers for Amazon ECS Managed Instances and EC2 instances. AWS Fargate has the predefined `FARGATE` and `FARGATE_SPOT` capacity providers.

## Syntax
<a name="aws-resource-ecs-capacityprovider-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ecs-capacityprovider-syntax.json"></a>

```
{
  "Type" : "AWS::ECS::CapacityProvider",
  "Properties" : {
      "[AutoScalingGroupProvider](#cfn-ecs-capacityprovider-autoscalinggroupprovider)" : AutoScalingGroupProvider,
      "[ClusterName](#cfn-ecs-capacityprovider-clustername)" : String,
      "[ManagedInstancesProvider](#cfn-ecs-capacityprovider-managedinstancesprovider)" : ManagedInstancesProvider,
      "[Name](#cfn-ecs-capacityprovider-name)" : String,
      "[Tags](#cfn-ecs-capacityprovider-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-ecs-capacityprovider-syntax.yaml"></a>

```
Type: AWS::ECS::CapacityProvider
Properties:
  [AutoScalingGroupProvider](#cfn-ecs-capacityprovider-autoscalinggroupprovider): 
    AutoScalingGroupProvider
  [ClusterName](#cfn-ecs-capacityprovider-clustername): String
  [ManagedInstancesProvider](#cfn-ecs-capacityprovider-managedinstancesprovider): 
    ManagedInstancesProvider
  [Name](#cfn-ecs-capacityprovider-name): String
  [Tags](#cfn-ecs-capacityprovider-tags): 
    - Tag
```

## Properties
<a name="aws-resource-ecs-capacityprovider-properties"></a>

`AutoScalingGroupProvider`  <a name="cfn-ecs-capacityprovider-autoscalinggroupprovider"></a>
The Auto Scaling group settings for the capacity provider.  
*Required*: No  
*Type*: [AutoScalingGroupProvider](aws-properties-ecs-capacityprovider-autoscalinggroupprovider.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ClusterName`  <a name="cfn-ecs-capacityprovider-clustername"></a>
The cluster that this capacity provider is associated with. Managed instances capacity providers are cluster-scoped, meaning they can only be used within their associated cluster.  
This is required for Managed instances.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ManagedInstancesProvider`  <a name="cfn-ecs-capacityprovider-managedinstancesprovider"></a>
The configuration for the Amazon ECS Managed Instances provider. This includes the infrastructure role, the launch template configuration, and tag propagation settings.  
*Required*: No  
*Type*: [ManagedInstancesProvider](aws-properties-ecs-capacityprovider-managedinstancesprovider.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-ecs-capacityprovider-name"></a>
The name of the capacity provider. If a name is specified, it cannot start with `aws`, `ecs`, or `fargate`. If no name is specified, a default name in the `CFNStackName-CFNResourceName-RandomString` format is used.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-ecs-capacityprovider-tags"></a>
The metadata that you apply to the capacity provider to help you categorize and organize it. Each tag consists of a key and an optional value. You define both.  
The following basic restrictions apply to tags:  
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
*Required*: No  
*Type*: Array of [Tag](aws-properties-ecs-capacityprovider-tag.md)  
*Minimum*: `0`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-ecs-capacityprovider-return-values"></a>

### Ref
<a name="aws-resource-ecs-capacityprovider-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name.

In the following example, the `Ref` function returns the name of the capacity provider, such as `MyStack-MyCapacityProvider-JrwYBzxovGfr`.

 `{ "Ref": "MyCapacityProvider" }` 

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

## Examples
<a name="aws-resource-ecs-capacityprovider--examples"></a>



### Creating an Amazon ECS capacity provider
<a name="aws-resource-ecs-capacityprovider--examples--Creating_an_Amazon_ECS_capacity_provider"></a>

The following example creates a capacity provider that uses the Auto Scaling group `MyAutoScalingGroup`, has managed scaling and managed termination protection enabled. This configuration is used for Amazon ECS cluster auto scaling.

#### JSON
<a name="aws-resource-ecs-capacityprovider--examples--Creating_an_Amazon_ECS_capacity_provider--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
    "MyCapacityProvider": {
            "Type": "AWS::ECS::CapacityProvider",
            "Properties": {
                "AutoScalingGroupProvider": {
                    "AutoScalingGroupArn": "arn:aws:autoscaling:us-west-2:123456789012:autoScalingGroup:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/MyAutoScalingGroup",
                    "ManagedScaling": {
                        "MaximumScalingStepSize": 10,
                        "MinimumScalingStepSize": 1,
                        "Status": "ENABLED",
                        "TargetCapacity": 100
                    },
                    "ManagedTerminationProtection": "ENABLED"
                },
                "Tags": [
                    {
                        "Key": "environment",
                        "Value": "production"
                    }
                ]
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-ecs-capacityprovider--examples--Creating_an_Amazon_ECS_capacity_provider--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
 MyCapacityProvider:
    Type: AWS::ECS::CapacityProvider
    Properties:
        AutoScalingGroupProvider:
            AutoScalingGroupArn: arn:aws:autoscaling:us-west-2:123456789012:autoScalingGroup:a1b2c3d4-5678-90ab-cdef-EXAMPLE11111:autoScalingGroupName/MyAutoScalingGroup
            ManagedScaling:
                MaximumScalingStepSize: 10
                MinimumScalingStepSize: 1
                Status: ENABLED
                TargetCapacity: 100
            ManagedTerminationProtection: ENABLED
        Tags:
            - Key: environment
              Value: production
```

# AWS::ECS::CapacityProvider AcceleratorCountRequest
<a name="aws-properties-ecs-capacityprovider-acceleratorcountrequest"></a>

The minimum and maximum number of accelerators (such as GPUs) for instance type selection. This is used for workloads that require specific numbers of accelerators.

## Syntax
<a name="aws-properties-ecs-capacityprovider-acceleratorcountrequest-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-acceleratorcountrequest-syntax.json"></a>

```
{
  "[Max](#cfn-ecs-capacityprovider-acceleratorcountrequest-max)" : Integer,
  "[Min](#cfn-ecs-capacityprovider-acceleratorcountrequest-min)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-acceleratorcountrequest-syntax.yaml"></a>

```
  [Max](#cfn-ecs-capacityprovider-acceleratorcountrequest-max): Integer
  [Min](#cfn-ecs-capacityprovider-acceleratorcountrequest-min): Integer
```

## Properties
<a name="aws-properties-ecs-capacityprovider-acceleratorcountrequest-properties"></a>

`Max`  <a name="cfn-ecs-capacityprovider-acceleratorcountrequest-max"></a>
The maximum number of accelerators. Instance types with more accelerators are excluded from selection.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Min`  <a name="cfn-ecs-capacityprovider-acceleratorcountrequest-min"></a>
The minimum number of accelerators. Instance types with fewer accelerators are excluded from selection.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider AcceleratorTotalMemoryMiBRequest
<a name="aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest"></a>

The minimum and maximum total accelerator memory in mebibytes (MiB) for instance type selection. This is important for GPU workloads that require specific amounts of video memory.

## Syntax
<a name="aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest-syntax.json"></a>

```
{
  "[Max](#cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-max)" : Integer,
  "[Min](#cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-min)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest-syntax.yaml"></a>

```
  [Max](#cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-max): Integer
  [Min](#cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-min): Integer
```

## Properties
<a name="aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest-properties"></a>

`Max`  <a name="cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-max"></a>
The maximum total accelerator memory in MiB. Instance types with more accelerator memory are excluded from selection.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Min`  <a name="cfn-ecs-capacityprovider-acceleratortotalmemorymibrequest-min"></a>
The minimum total accelerator memory in MiB. Instance types with less accelerator memory are excluded from selection.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider AutoRepairConfiguration
<a name="aws-properties-ecs-capacityprovider-autorepairconfiguration"></a>

<a name="aws-properties-ecs-capacityprovider-autorepairconfiguration-description"></a>The `AutoRepairConfiguration` property type specifies Property description not available. for an [AWS::ECS::CapacityProvider](aws-resource-ecs-capacityprovider.md).

## Syntax
<a name="aws-properties-ecs-capacityprovider-autorepairconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-autorepairconfiguration-syntax.json"></a>

```
{
  "[ActionsStatus](#cfn-ecs-capacityprovider-autorepairconfiguration-actionsstatus)" : String
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-autorepairconfiguration-syntax.yaml"></a>

```
  [ActionsStatus](#cfn-ecs-capacityprovider-autorepairconfiguration-actionsstatus): String
```

## Properties
<a name="aws-properties-ecs-capacityprovider-autorepairconfiguration-properties"></a>

`ActionsStatus`  <a name="cfn-ecs-capacityprovider-autorepairconfiguration-actionsstatus"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Allowed values*: `ENABLED | DISABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider AutoScalingGroupProvider
<a name="aws-properties-ecs-capacityprovider-autoscalinggroupprovider"></a>

The details of the Auto Scaling group for the capacity provider.

## Syntax
<a name="aws-properties-ecs-capacityprovider-autoscalinggroupprovider-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-autoscalinggroupprovider-syntax.json"></a>

```
{
  "[AutoScalingGroupArn](#cfn-ecs-capacityprovider-autoscalinggroupprovider-autoscalinggrouparn)" : String,
  "[ManagedDraining](#cfn-ecs-capacityprovider-autoscalinggroupprovider-manageddraining)" : String,
  "[ManagedScaling](#cfn-ecs-capacityprovider-autoscalinggroupprovider-managedscaling)" : ManagedScaling,
  "[ManagedTerminationProtection](#cfn-ecs-capacityprovider-autoscalinggroupprovider-managedterminationprotection)" : String
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-autoscalinggroupprovider-syntax.yaml"></a>

```
  [AutoScalingGroupArn](#cfn-ecs-capacityprovider-autoscalinggroupprovider-autoscalinggrouparn): String
  [ManagedDraining](#cfn-ecs-capacityprovider-autoscalinggroupprovider-manageddraining): String
  [ManagedScaling](#cfn-ecs-capacityprovider-autoscalinggroupprovider-managedscaling): 
    ManagedScaling
  [ManagedTerminationProtection](#cfn-ecs-capacityprovider-autoscalinggroupprovider-managedterminationprotection): String
```

## Properties
<a name="aws-properties-ecs-capacityprovider-autoscalinggroupprovider-properties"></a>

`AutoScalingGroupArn`  <a name="cfn-ecs-capacityprovider-autoscalinggroupprovider-autoscalinggrouparn"></a>
The Amazon Resource Name (ARN) that identifies the Auto Scaling group, or the Auto Scaling group name.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ManagedDraining`  <a name="cfn-ecs-capacityprovider-autoscalinggroupprovider-manageddraining"></a>
The managed draining option for the Auto Scaling group capacity provider. When you enable this, Amazon ECS manages and gracefully drains the EC2 container instances that are in the Auto Scaling group capacity provider.  
*Required*: No  
*Type*: String  
*Allowed values*: `DISABLED | ENABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ManagedScaling`  <a name="cfn-ecs-capacityprovider-autoscalinggroupprovider-managedscaling"></a>
The managed scaling settings for the Auto Scaling group capacity provider.  
*Required*: No  
*Type*: [ManagedScaling](aws-properties-ecs-capacityprovider-managedscaling.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ManagedTerminationProtection`  <a name="cfn-ecs-capacityprovider-autoscalinggroupprovider-managedterminationprotection"></a>
The managed termination protection setting to use for the Auto Scaling group capacity provider. This determines whether the Auto Scaling group has managed termination protection. The default is off.  
When using managed termination protection, managed scaling must also be used otherwise managed termination protection doesn't work.
When managed termination protection is on, Amazon ECS prevents the Amazon EC2 instances in an Auto Scaling group that contain tasks from being terminated during a scale-in action. The Auto Scaling group and each instance in the Auto Scaling group must have instance protection from scale-in actions on as well. For more information, see [Instance Protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-termination.html#instance-protection) in the *AWS Auto Scaling User Guide*.  
When managed termination protection is off, your Amazon EC2 instances aren't protected from termination when the Auto Scaling group scales in.  
*Required*: No  
*Type*: String  
*Allowed values*: `DISABLED | ENABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-capacityprovider-autoscalinggroupprovider--seealso"></a>
+  [ Defining an Amazon ECS capacity provider](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#aws-resource-ecs-capacityprovider--examples) 

# AWS::ECS::CapacityProvider BaselineEbsBandwidthMbpsRequest
<a name="aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest"></a>

The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps) for instance type selection. This is important for workloads with high storage I/O requirements.

## Syntax
<a name="aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-syntax.json"></a>

```
{
  "[Max](#cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-max)" : Integer,
  "[Min](#cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-min)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-syntax.yaml"></a>

```
  [Max](#cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-max): Integer
  [Min](#cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-min): Integer
```

## Properties
<a name="aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-properties"></a>

`Max`  <a name="cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-max"></a>
The maximum baseline Amazon EBS bandwidth in Mbps. Instance types with higher Amazon EBS bandwidth are excluded from selection.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Min`  <a name="cfn-ecs-capacityprovider-baselineebsbandwidthmbpsrequest-min"></a>
The minimum baseline Amazon EBS bandwidth in Mbps. Instance types with lower Amazon EBS bandwidth are excluded from selection.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider CapacityReservationRequest
<a name="aws-properties-ecs-capacityprovider-capacityreservationrequest"></a>

The Capacity Reservation configurations to be used when using the `RESERVED` capacity option type.

## Syntax
<a name="aws-properties-ecs-capacityprovider-capacityreservationrequest-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-capacityreservationrequest-syntax.json"></a>

```
{
  "[ReservationGroupArn](#cfn-ecs-capacityprovider-capacityreservationrequest-reservationgrouparn)" : String,
  "[ReservationPreference](#cfn-ecs-capacityprovider-capacityreservationrequest-reservationpreference)" : String
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-capacityreservationrequest-syntax.yaml"></a>

```
  [ReservationGroupArn](#cfn-ecs-capacityprovider-capacityreservationrequest-reservationgrouparn): String
  [ReservationPreference](#cfn-ecs-capacityprovider-capacityreservationrequest-reservationpreference): String
```

## Properties
<a name="aws-properties-ecs-capacityprovider-capacityreservationrequest-properties"></a>

`ReservationGroupArn`  <a name="cfn-ecs-capacityprovider-capacityreservationrequest-reservationgrouparn"></a>
The ARN of the Capacity Reservation resource group in which to run the instance.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ReservationPreference`  <a name="cfn-ecs-capacityprovider-capacityreservationrequest-reservationpreference"></a>
The preference on when capacity reservations should be used.  
Valid values are:  
+ `RESERVATIONS_ONLY` - Exclusively launch instances into capacity reservations that match the instance requirements configured for the capacity provider. If none exist, instances will fail to provision.
+ `RESERVATIONS_FIRST` - Prefer to launch instances into a capacity reservation if any exist that match the instance requirements configured for the capacity provider. If none exist, fall back to launching instances On-Demand.
+ `RESERVATIONS_EXCLUDED` - Avoid using capacity reservations and launch exclusively On-Demand.
*Required*: No  
*Type*: String  
*Allowed values*: `RESERVATIONS_ONLY | RESERVATIONS_FIRST | RESERVATIONS_EXCLUDED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider InfrastructureOptimization
<a name="aws-properties-ecs-capacityprovider-infrastructureoptimization"></a>

The configuration that controls how Amazon ECS optimizes your infrastructure.

## Syntax
<a name="aws-properties-ecs-capacityprovider-infrastructureoptimization-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-infrastructureoptimization-syntax.json"></a>

```
{
  "[ScaleInAfter](#cfn-ecs-capacityprovider-infrastructureoptimization-scaleinafter)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-infrastructureoptimization-syntax.yaml"></a>

```
  [ScaleInAfter](#cfn-ecs-capacityprovider-infrastructureoptimization-scaleinafter): Integer
```

## Properties
<a name="aws-properties-ecs-capacityprovider-infrastructureoptimization-properties"></a>

`ScaleInAfter`  <a name="cfn-ecs-capacityprovider-infrastructureoptimization-scaleinafter"></a>
This parameter defines the number of seconds Amazon ECS Managed Instances waits before optimizing EC2 instances that have become idle or underutilized. A longer delay increases the likelihood of placing new tasks on idle or underutilized instances instances, reducing startup time. A shorter delay helps reduce infrastructure costs by optimizing idle or underutilized instances,instances more quickly.  
Valid values are:  
+ `null` - Uses the default optimization behavior.
+ `-1` - Disables automatic infrastructure optimization.
+ A value between `0` and `3600` (inclusive) - Specifies the number of seconds to wait before optimizing instances.
*Required*: No  
*Type*: Integer  
*Minimum*: `-1`  
*Maximum*: `3600`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider InstanceLaunchTemplate
<a name="aws-properties-ecs-capacityprovider-instancelaunchtemplate"></a>

The launch template configuration for Amazon ECS Managed Instances. This defines how Amazon ECS launches Amazon EC2 instances, including the instance profile for your tasks, network and storage configuration, capacity options, and instance requirements for flexible instance type selection.

## Syntax
<a name="aws-properties-ecs-capacityprovider-instancelaunchtemplate-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-instancelaunchtemplate-syntax.json"></a>

```
{
  "[CapacityOptionType](#cfn-ecs-capacityprovider-instancelaunchtemplate-capacityoptiontype)" : String,
  "[CapacityReservations](#cfn-ecs-capacityprovider-instancelaunchtemplate-capacityreservations)" : CapacityReservationRequest,
  "[Ec2InstanceProfileArn](#cfn-ecs-capacityprovider-instancelaunchtemplate-ec2instanceprofilearn)" : String,
  "[FipsEnabled](#cfn-ecs-capacityprovider-instancelaunchtemplate-fipsenabled)" : Boolean,
  "[InstanceMetadataTagsPropagation](#cfn-ecs-capacityprovider-instancelaunchtemplate-instancemetadatatagspropagation)" : Boolean,
  "[InstanceRequirements](#cfn-ecs-capacityprovider-instancelaunchtemplate-instancerequirements)" : InstanceRequirementsRequest,
  "[LocalStorageConfiguration](#cfn-ecs-capacityprovider-instancelaunchtemplate-localstorageconfiguration)" : ManagedInstancesLocalStorageConfiguration,
  "[Monitoring](#cfn-ecs-capacityprovider-instancelaunchtemplate-monitoring)" : String,
  "[NetworkConfiguration](#cfn-ecs-capacityprovider-instancelaunchtemplate-networkconfiguration)" : ManagedInstancesNetworkConfiguration,
  "[StorageConfiguration](#cfn-ecs-capacityprovider-instancelaunchtemplate-storageconfiguration)" : ManagedInstancesStorageConfiguration
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-instancelaunchtemplate-syntax.yaml"></a>

```
  [CapacityOptionType](#cfn-ecs-capacityprovider-instancelaunchtemplate-capacityoptiontype): String
  [CapacityReservations](#cfn-ecs-capacityprovider-instancelaunchtemplate-capacityreservations): 
    CapacityReservationRequest
  [Ec2InstanceProfileArn](#cfn-ecs-capacityprovider-instancelaunchtemplate-ec2instanceprofilearn): String
  [FipsEnabled](#cfn-ecs-capacityprovider-instancelaunchtemplate-fipsenabled): Boolean
  [InstanceMetadataTagsPropagation](#cfn-ecs-capacityprovider-instancelaunchtemplate-instancemetadatatagspropagation): Boolean
  [InstanceRequirements](#cfn-ecs-capacityprovider-instancelaunchtemplate-instancerequirements): 
    InstanceRequirementsRequest
  [LocalStorageConfiguration](#cfn-ecs-capacityprovider-instancelaunchtemplate-localstorageconfiguration): 
    ManagedInstancesLocalStorageConfiguration
  [Monitoring](#cfn-ecs-capacityprovider-instancelaunchtemplate-monitoring): String
  [NetworkConfiguration](#cfn-ecs-capacityprovider-instancelaunchtemplate-networkconfiguration): 
    ManagedInstancesNetworkConfiguration
  [StorageConfiguration](#cfn-ecs-capacityprovider-instancelaunchtemplate-storageconfiguration): 
    ManagedInstancesStorageConfiguration
```

## Properties
<a name="aws-properties-ecs-capacityprovider-instancelaunchtemplate-properties"></a>

`CapacityOptionType`  <a name="cfn-ecs-capacityprovider-instancelaunchtemplate-capacityoptiontype"></a>
The capacity option type. This determines whether Amazon ECS launches On-Demand, Spot or Capacity Reservation Instances for your managed instance capacity provider.  
Valid values are:  
+ `ON_DEMAND` - Launches standard On-Demand Instances. On-Demand Instances provide predictable pricing and availability.
+ `SPOT` - Launches Spot Instances that use spare Amazon EC2 capacity at reduced cost. Spot Instances can be interrupted by Amazon EC2 with a two-minute notification when the capacity is needed back.
+ `RESERVED` - Launches Instances using Amazon EC2 Capacity Reservations. Capacity Reservations allow you to reserve compute capacity for Amazon EC2 instances in a specific Availability Zone.
The default is On-Demand  
For more information about Amazon EC2 capacity options, see [Instance purchasing options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html) in the *Amazon EC2 User Guide*.  
*Required*: No  
*Type*: String  
*Allowed values*: `ON_DEMAND | SPOT | RESERVED`  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`CapacityReservations`  <a name="cfn-ecs-capacityprovider-instancelaunchtemplate-capacityreservations"></a>
Capacity reservation specifications. You can specify:  
+ Capacity reservation preference
+ Reservation resource group to be used for targeted capacity reservations
Amazon ECS will launch instances according to the specified criteria.  
*Required*: No  
*Type*: [CapacityReservationRequest](aws-properties-ecs-capacityprovider-capacityreservationrequest.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Ec2InstanceProfileArn`  <a name="cfn-ecs-capacityprovider-instancelaunchtemplate-ec2instanceprofilearn"></a>
The Amazon Resource Name (ARN) of the instance profile that Amazon ECS applies to Amazon ECS Managed Instances. This instance profile must include the necessary permissions for your tasks to access AWS services and resources.  
For more information, see [Amazon ECS instance profile for Managed Instances](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/managed-instances-instance-profile.html) in the *Amazon ECS Developer Guide*.   
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FipsEnabled`  <a name="cfn-ecs-capacityprovider-instancelaunchtemplate-fipsenabled"></a>
Determines whether to enable FIPS 140-2 validated cryptographic modules on EC2 instances launched by the capacity provider. If `true`, instances use FIPS-compliant cryptographic algorithms and modules for enhanced security compliance. If `false`, instances use standard cryptographic implementations.  
If not specified, instances are launched with FIPS enabled in AWS GovCloud (US) regions and FIPS disabled in other regions.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`InstanceMetadataTagsPropagation`  <a name="cfn-ecs-capacityprovider-instancelaunchtemplate-instancemetadatatagspropagation"></a>
Determines whether tags are propagated to the instance metadata service (IMDS) for Amazon EC2 instances launched by the Managed Instances capacity provider. When enabled, all tags associated with the instance are available through the instance metadata service. When disabled, tags are not propagated to IMDS.  
Disable this setting if your tags contain characters that are not compatible with IMDS, such as `/`. IMDS requires tag keys to match the pattern `[0-9a-zA-Z\-_+=,.@:]{1,255}`.  
The default value is `true`.  
For more information, see [Work with instance tags in instance metadata](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS) in the *Amazon EC2 User Guide*.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InstanceRequirements`  <a name="cfn-ecs-capacityprovider-instancelaunchtemplate-instancerequirements"></a>
The instance requirements. You can specify:  
+ The instance types
+ Instance requirements such as vCPU count, memory, network performance, and accelerator specifications
Amazon ECS automatically selects the instances that match the specified criteria.  
*Required*: No  
*Type*: [InstanceRequirementsRequest](aws-properties-ecs-capacityprovider-instancerequirementsrequest.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LocalStorageConfiguration`  <a name="cfn-ecs-capacityprovider-instancelaunchtemplate-localstorageconfiguration"></a>
The local storage configuration for Amazon ECS Managed Instances. This defines how ECS uses instance store volumes available on the container instance.  
*Required*: No  
*Type*: [ManagedInstancesLocalStorageConfiguration](aws-properties-ecs-capacityprovider-managedinstanceslocalstorageconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Monitoring`  <a name="cfn-ecs-capacityprovider-instancelaunchtemplate-monitoring"></a>
CloudWatch provides two categories of monitoring: basic monitoring and detailed monitoring. By default, your managed instance is configured for basic monitoring. You can optionally enable detailed monitoring to help you more quickly identify and act on operational issues. You can enable or turn off detailed monitoring at launch or when the managed instance is running or stopped. For more information, see [Detailed monitoring for Amazon ECS Managed Instances](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/detailed-monitoring-managed-instances.html) in the Amazon ECS Developer Guide.  
*Required*: No  
*Type*: String  
*Allowed values*: `BASIC | DETAILED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NetworkConfiguration`  <a name="cfn-ecs-capacityprovider-instancelaunchtemplate-networkconfiguration"></a>
The network configuration for Amazon ECS Managed Instances. This specifies the subnets and security groups that instances use for network connectivity.  
*Required*: Yes  
*Type*: [ManagedInstancesNetworkConfiguration](aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StorageConfiguration`  <a name="cfn-ecs-capacityprovider-instancelaunchtemplate-storageconfiguration"></a>
The storage configuration for Amazon ECS Managed Instances. This defines the data volume properties for the instances.  
*Required*: No  
*Type*: [ManagedInstancesStorageConfiguration](aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider InstanceRequirementsRequest
<a name="aws-properties-ecs-capacityprovider-instancerequirementsrequest"></a>

The instance requirements for attribute-based instance type selection. Instead of specifying exact instance types, you define requirements such as vCPU count, memory size, network performance, and accelerator specifications. Amazon ECS automatically selects Amazon EC2 instance types that match these requirements, providing flexibility and helping to mitigate capacity constraints.

## Syntax
<a name="aws-properties-ecs-capacityprovider-instancerequirementsrequest-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-instancerequirementsrequest-syntax.json"></a>

```
{
  "[AcceleratorCount](#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratorcount)" : AcceleratorCountRequest,
  "[AcceleratorManufacturers](#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratormanufacturers)" : [ String, ... ],
  "[AcceleratorNames](#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratornames)" : [ String, ... ],
  "[AcceleratorTotalMemoryMiB](#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortotalmemorymib)" : AcceleratorTotalMemoryMiBRequest,
  "[AcceleratorTypes](#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortypes)" : [ String, ... ],
  "[AllowedInstanceTypes](#cfn-ecs-capacityprovider-instancerequirementsrequest-allowedinstancetypes)" : [ String, ... ],
  "[BareMetal](#cfn-ecs-capacityprovider-instancerequirementsrequest-baremetal)" : String,
  "[BaselineEbsBandwidthMbps](#cfn-ecs-capacityprovider-instancerequirementsrequest-baselineebsbandwidthmbps)" : BaselineEbsBandwidthMbpsRequest,
  "[BurstablePerformance](#cfn-ecs-capacityprovider-instancerequirementsrequest-burstableperformance)" : String,
  "[CpuManufacturers](#cfn-ecs-capacityprovider-instancerequirementsrequest-cpumanufacturers)" : [ String, ... ],
  "[ExcludedInstanceTypes](#cfn-ecs-capacityprovider-instancerequirementsrequest-excludedinstancetypes)" : [ String, ... ],
  "[InstanceGenerations](#cfn-ecs-capacityprovider-instancerequirementsrequest-instancegenerations)" : [ String, ... ],
  "[LocalStorage](#cfn-ecs-capacityprovider-instancerequirementsrequest-localstorage)" : String,
  "[LocalStorageTypes](#cfn-ecs-capacityprovider-instancerequirementsrequest-localstoragetypes)" : [ String, ... ],
  "[MaxSpotPriceAsPercentageOfOptimalOnDemandPrice](#cfn-ecs-capacityprovider-instancerequirementsrequest-maxspotpriceaspercentageofoptimalondemandprice)" : Integer,
  "[MemoryGiBPerVCpu](#cfn-ecs-capacityprovider-instancerequirementsrequest-memorygibpervcpu)" : MemoryGiBPerVCpuRequest,
  "[MemoryMiB](#cfn-ecs-capacityprovider-instancerequirementsrequest-memorymib)" : MemoryMiBRequest,
  "[NetworkBandwidthGbps](#cfn-ecs-capacityprovider-instancerequirementsrequest-networkbandwidthgbps)" : NetworkBandwidthGbpsRequest,
  "[NetworkInterfaceCount](#cfn-ecs-capacityprovider-instancerequirementsrequest-networkinterfacecount)" : NetworkInterfaceCountRequest,
  "[OnDemandMaxPricePercentageOverLowestPrice](#cfn-ecs-capacityprovider-instancerequirementsrequest-ondemandmaxpricepercentageoverlowestprice)" : Integer,
  "[RequireHibernateSupport](#cfn-ecs-capacityprovider-instancerequirementsrequest-requirehibernatesupport)" : Boolean,
  "[SpotMaxPricePercentageOverLowestPrice](#cfn-ecs-capacityprovider-instancerequirementsrequest-spotmaxpricepercentageoverlowestprice)" : Integer,
  "[TotalLocalStorageGB](#cfn-ecs-capacityprovider-instancerequirementsrequest-totallocalstoragegb)" : TotalLocalStorageGBRequest,
  "[VCpuCount](#cfn-ecs-capacityprovider-instancerequirementsrequest-vcpucount)" : VCpuCountRangeRequest
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-instancerequirementsrequest-syntax.yaml"></a>

```
  [AcceleratorCount](#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratorcount): 
    AcceleratorCountRequest
  [AcceleratorManufacturers](#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratormanufacturers): 
    - String
  [AcceleratorNames](#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratornames): 
    - String
  [AcceleratorTotalMemoryMiB](#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortotalmemorymib): 
    AcceleratorTotalMemoryMiBRequest
  [AcceleratorTypes](#cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortypes): 
    - String
  [AllowedInstanceTypes](#cfn-ecs-capacityprovider-instancerequirementsrequest-allowedinstancetypes): 
    - String
  [BareMetal](#cfn-ecs-capacityprovider-instancerequirementsrequest-baremetal): String
  [BaselineEbsBandwidthMbps](#cfn-ecs-capacityprovider-instancerequirementsrequest-baselineebsbandwidthmbps): 
    BaselineEbsBandwidthMbpsRequest
  [BurstablePerformance](#cfn-ecs-capacityprovider-instancerequirementsrequest-burstableperformance): String
  [CpuManufacturers](#cfn-ecs-capacityprovider-instancerequirementsrequest-cpumanufacturers): 
    - String
  [ExcludedInstanceTypes](#cfn-ecs-capacityprovider-instancerequirementsrequest-excludedinstancetypes): 
    - String
  [InstanceGenerations](#cfn-ecs-capacityprovider-instancerequirementsrequest-instancegenerations): 
    - String
  [LocalStorage](#cfn-ecs-capacityprovider-instancerequirementsrequest-localstorage): String
  [LocalStorageTypes](#cfn-ecs-capacityprovider-instancerequirementsrequest-localstoragetypes): 
    - String
  [MaxSpotPriceAsPercentageOfOptimalOnDemandPrice](#cfn-ecs-capacityprovider-instancerequirementsrequest-maxspotpriceaspercentageofoptimalondemandprice): Integer
  [MemoryGiBPerVCpu](#cfn-ecs-capacityprovider-instancerequirementsrequest-memorygibpervcpu): 
    MemoryGiBPerVCpuRequest
  [MemoryMiB](#cfn-ecs-capacityprovider-instancerequirementsrequest-memorymib): 
    MemoryMiBRequest
  [NetworkBandwidthGbps](#cfn-ecs-capacityprovider-instancerequirementsrequest-networkbandwidthgbps): 
    NetworkBandwidthGbpsRequest
  [NetworkInterfaceCount](#cfn-ecs-capacityprovider-instancerequirementsrequest-networkinterfacecount): 
    NetworkInterfaceCountRequest
  [OnDemandMaxPricePercentageOverLowestPrice](#cfn-ecs-capacityprovider-instancerequirementsrequest-ondemandmaxpricepercentageoverlowestprice): Integer
  [RequireHibernateSupport](#cfn-ecs-capacityprovider-instancerequirementsrequest-requirehibernatesupport): Boolean
  [SpotMaxPricePercentageOverLowestPrice](#cfn-ecs-capacityprovider-instancerequirementsrequest-spotmaxpricepercentageoverlowestprice): Integer
  [TotalLocalStorageGB](#cfn-ecs-capacityprovider-instancerequirementsrequest-totallocalstoragegb): 
    TotalLocalStorageGBRequest
  [VCpuCount](#cfn-ecs-capacityprovider-instancerequirementsrequest-vcpucount): 
    VCpuCountRangeRequest
```

## Properties
<a name="aws-properties-ecs-capacityprovider-instancerequirementsrequest-properties"></a>

`AcceleratorCount`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratorcount"></a>
The minimum and maximum number of accelerators for the instance types. This is used when you need instances with specific numbers of GPUs or other accelerators.  
*Required*: No  
*Type*: [AcceleratorCountRequest](aws-properties-ecs-capacityprovider-acceleratorcountrequest.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AcceleratorManufacturers`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratormanufacturers"></a>
The accelerator manufacturers to include. You can specify `nvidia`, `amd`, `amazon-web-services`, or `xilinx` depending on your accelerator requirements.  
*Required*: No  
*Type*: Array of String  
*Allowed values*: `amazon-web-services | amd | habana | nvidia | xilinx`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AcceleratorNames`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratornames"></a>
The specific accelerator names to include. For example, you can specify `a100`, `v100`, `k80`, or other specific accelerator models.  
*Required*: No  
*Type*: Array of String  
*Allowed values*: `a10g | a100 | h100 | inferentia | k520 | k80 | m60 | radeon-pro-v520 | t4 | t4g | vu9p | v100 | l40s`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AcceleratorTotalMemoryMiB`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortotalmemorymib"></a>
The minimum and maximum total accelerator memory in mebibytes (MiB). This is important for GPU workloads that require specific amounts of video memory.  
*Required*: No  
*Type*: [AcceleratorTotalMemoryMiBRequest](aws-properties-ecs-capacityprovider-acceleratortotalmemorymibrequest.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AcceleratorTypes`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-acceleratortypes"></a>
The accelerator types to include. You can specify `gpu` for graphics processing units, `fpga` for field programmable gate arrays, or `inference` for machine learning inference accelerators.  
*Required*: No  
*Type*: Array of String  
*Allowed values*: `gpu | fpga | inference`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AllowedInstanceTypes`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-allowedinstancetypes"></a>
The instance types to include in the selection. When specified, Amazon ECS only considers these instance types, subject to the other requirements specified.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `30`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BareMetal`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-baremetal"></a>
Indicates whether to include bare metal instance types. Set to `included` to allow bare metal instances, `excluded` to exclude them, or `required` to use only bare metal instances.  
*Required*: No  
*Type*: String  
*Allowed values*: `included | required | excluded`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BaselineEbsBandwidthMbps`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-baselineebsbandwidthmbps"></a>
The minimum and maximum baseline Amazon EBS bandwidth in megabits per second (Mbps). This is important for workloads with high storage I/O requirements.  
*Required*: No  
*Type*: [BaselineEbsBandwidthMbpsRequest](aws-properties-ecs-capacityprovider-baselineebsbandwidthmbpsrequest.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BurstablePerformance`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-burstableperformance"></a>
Indicates whether to include burstable performance instance types (T2, T3, T3a, T4g). Set to `included` to allow burstable instances, `excluded` to exclude them, or `required` to use only burstable instances.  
*Required*: No  
*Type*: String  
*Allowed values*: `included | required | excluded`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CpuManufacturers`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-cpumanufacturers"></a>
The CPU manufacturers to include or exclude. You can specify `intel`, `amd`, or `amazon-web-services` to control which CPU types are used for your workloads.  
*Required*: No  
*Type*: Array of String  
*Allowed values*: `intel | amd | amazon-web-services`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ExcludedInstanceTypes`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-excludedinstancetypes"></a>
The instance types to exclude from selection. Use this to prevent Amazon ECS from selecting specific instance types that may not be suitable for your workloads.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1`  
*Maximum*: `30`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InstanceGenerations`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-instancegenerations"></a>
The instance generations to include. You can specify `current` to use the latest generation instances, or `previous` to include previous generation instances for cost optimization.  
*Required*: No  
*Type*: Array of String  
*Allowed values*: `current | previous`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LocalStorage`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-localstorage"></a>
Indicates whether to include instance types with local storage. Set to `included` to allow local storage, `excluded` to exclude it, or `required` to use only instances with local storage.  
*Required*: No  
*Type*: String  
*Allowed values*: `included | required | excluded`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LocalStorageTypes`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-localstoragetypes"></a>
The local storage types to include. You can specify `hdd` for hard disk drives, `ssd` for solid state drives, or both.  
*Required*: No  
*Type*: Array of String  
*Allowed values*: `hdd | ssd`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxSpotPriceAsPercentageOfOptimalOnDemandPrice`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-maxspotpriceaspercentageofoptimalondemandprice"></a>
The maximum price for Spot instances as a percentage of the optimal On-Demand price. This provides more precise cost control for Spot instance selection.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MemoryGiBPerVCpu`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-memorygibpervcpu"></a>
The minimum and maximum amount of memory per vCPU in gibibytes (GiB). This helps ensure that instance types have the appropriate memory-to-CPU ratio for your workloads.  
*Required*: No  
*Type*: [MemoryGiBPerVCpuRequest](aws-properties-ecs-capacityprovider-memorygibpervcpurequest.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MemoryMiB`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-memorymib"></a>
The minimum and maximum amount of memory in mebibytes (MiB) for the instance types. Amazon ECS selects instance types that have memory within this range.  
*Required*: Yes  
*Type*: [MemoryMiBRequest](aws-properties-ecs-capacityprovider-memorymibrequest.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NetworkBandwidthGbps`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-networkbandwidthgbps"></a>
The minimum and maximum network bandwidth in gigabits per second (Gbps). This is crucial for network-intensive workloads that require high throughput.  
*Required*: No  
*Type*: [NetworkBandwidthGbpsRequest](aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NetworkInterfaceCount`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-networkinterfacecount"></a>
The minimum and maximum number of network interfaces for the instance types. This is useful for workloads that require multiple network interfaces.  
*Required*: No  
*Type*: [NetworkInterfaceCountRequest](aws-properties-ecs-capacityprovider-networkinterfacecountrequest.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`OnDemandMaxPricePercentageOverLowestPrice`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-ondemandmaxpricepercentageoverlowestprice"></a>
The price protection threshold for On-Demand Instances, as a percentage higher than an identified On-Demand price. The identified On-Demand price is the price of the lowest priced current generation C, M, or R instance type with your specified attributes. If no current generation C, M, or R instance type matches your attributes, then the identified price is from either the lowest priced current generation instance types or, failing that, the lowest priced previous generation instance types that match your attributes. When Amazon ECS selects instance types with your attributes, we will exclude instance types whose price exceeds your specified threshold.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RequireHibernateSupport`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-requirehibernatesupport"></a>
Indicates whether the instance types must support hibernation. When set to `true`, only instance types that support hibernation are selected.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SpotMaxPricePercentageOverLowestPrice`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-spotmaxpricepercentageoverlowestprice"></a>
The maximum price for Spot instances as a percentage over the lowest priced On-Demand instance. This helps control Spot instance costs while maintaining access to capacity.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TotalLocalStorageGB`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-totallocalstoragegb"></a>
The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage.  
*Required*: No  
*Type*: [TotalLocalStorageGBRequest](aws-properties-ecs-capacityprovider-totallocalstoragegbrequest.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VCpuCount`  <a name="cfn-ecs-capacityprovider-instancerequirementsrequest-vcpucount"></a>
The minimum and maximum number of vCPUs for the instance types. Amazon ECS selects instance types that have vCPU counts within this range.  
*Required*: Yes  
*Type*: [VCpuCountRangeRequest](aws-properties-ecs-capacityprovider-vcpucountrangerequest.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider ManagedInstancesLocalStorageConfiguration
<a name="aws-properties-ecs-capacityprovider-managedinstanceslocalstorageconfiguration"></a>

The local storage configuration for Amazon ECS Managed Instances. This defines how ECS uses and configures instance store volumes available on container instance.

## Syntax
<a name="aws-properties-ecs-capacityprovider-managedinstanceslocalstorageconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-managedinstanceslocalstorageconfiguration-syntax.json"></a>

```
{
  "[UseLocalStorage](#cfn-ecs-capacityprovider-managedinstanceslocalstorageconfiguration-uselocalstorage)" : Boolean
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-managedinstanceslocalstorageconfiguration-syntax.yaml"></a>

```
  [UseLocalStorage](#cfn-ecs-capacityprovider-managedinstanceslocalstorageconfiguration-uselocalstorage): Boolean
```

## Properties
<a name="aws-properties-ecs-capacityprovider-managedinstanceslocalstorageconfiguration-properties"></a>

`UseLocalStorage`  <a name="cfn-ecs-capacityprovider-managedinstanceslocalstorageconfiguration-uselocalstorage"></a>
Use instance store volumes for data storage when available. EBS volumes are not provisioned for data storage. If the container instance has multiple instance store volumes, a single data volume is created. Consider defining instance store requirements using the `localStorage`, `localStorageTypes` and `totalLocalStorageGB` properties.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider ManagedInstancesNetworkConfiguration
<a name="aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration"></a>

The network configuration for Amazon ECS Managed Instances. This specifies the VPC subnets and security groups that instances use for network connectivity. Amazon ECS Managed Instances support multiple network modes including `awsvpc` (instances receive ENIs for task isolation), `host` (instances share network namespace with tasks), and `none` (no external network connectivity), ensuring backward compatibility for migrating workloads from Fargate or Amazon EC2.

## Syntax
<a name="aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration-syntax.json"></a>

```
{
  "[SecurityGroups](#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-securitygroups)" : [ String, ... ],
  "[Subnets](#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-subnets)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration-syntax.yaml"></a>

```
  [SecurityGroups](#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-securitygroups): 
    - String
  [Subnets](#cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-subnets): 
    - String
```

## Properties
<a name="aws-properties-ecs-capacityprovider-managedinstancesnetworkconfiguration-properties"></a>

`SecurityGroups`  <a name="cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-securitygroups"></a>
The list of security group IDs to apply to Amazon ECS Managed Instances. These security groups control the network traffic allowed to and from the instances.  
*Required*: Yes  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Subnets`  <a name="cfn-ecs-capacityprovider-managedinstancesnetworkconfiguration-subnets"></a>
The list of subnet IDs where Amazon ECS can launch Amazon ECS Managed Instances. Instances are distributed across the specified subnets for high availability. All subnets must be in the same VPC.  
*Required*: Yes  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider ManagedInstancesProvider
<a name="aws-properties-ecs-capacityprovider-managedinstancesprovider"></a>

The configuration for a Amazon ECS Managed Instances provider. Amazon ECS uses this configuration to automatically launch, manage, and terminate Amazon EC2 instances on your behalf. Managed instances provide access to the full range of Amazon EC2 instance types and features while offloading infrastructure management to AWS.

## Syntax
<a name="aws-properties-ecs-capacityprovider-managedinstancesprovider-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-managedinstancesprovider-syntax.json"></a>

```
{
  "[AutoRepairConfiguration](#cfn-ecs-capacityprovider-managedinstancesprovider-autorepairconfiguration)" : AutoRepairConfiguration,
  "[InfrastructureOptimization](#cfn-ecs-capacityprovider-managedinstancesprovider-infrastructureoptimization)" : InfrastructureOptimization,
  "[InfrastructureRoleArn](#cfn-ecs-capacityprovider-managedinstancesprovider-infrastructurerolearn)" : String,
  "[InstanceLaunchTemplate](#cfn-ecs-capacityprovider-managedinstancesprovider-instancelaunchtemplate)" : InstanceLaunchTemplate,
  "[PropagateTags](#cfn-ecs-capacityprovider-managedinstancesprovider-propagatetags)" : String
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-managedinstancesprovider-syntax.yaml"></a>

```
  [AutoRepairConfiguration](#cfn-ecs-capacityprovider-managedinstancesprovider-autorepairconfiguration): 
    AutoRepairConfiguration
  [InfrastructureOptimization](#cfn-ecs-capacityprovider-managedinstancesprovider-infrastructureoptimization): 
    InfrastructureOptimization
  [InfrastructureRoleArn](#cfn-ecs-capacityprovider-managedinstancesprovider-infrastructurerolearn): String
  [InstanceLaunchTemplate](#cfn-ecs-capacityprovider-managedinstancesprovider-instancelaunchtemplate): 
    InstanceLaunchTemplate
  [PropagateTags](#cfn-ecs-capacityprovider-managedinstancesprovider-propagatetags): String
```

## Properties
<a name="aws-properties-ecs-capacityprovider-managedinstancesprovider-properties"></a>

`AutoRepairConfiguration`  <a name="cfn-ecs-capacityprovider-managedinstancesprovider-autorepairconfiguration"></a>
Property description not available.  
*Required*: No  
*Type*: [AutoRepairConfiguration](aws-properties-ecs-capacityprovider-autorepairconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InfrastructureOptimization`  <a name="cfn-ecs-capacityprovider-managedinstancesprovider-infrastructureoptimization"></a>
Defines how Amazon ECS Managed Instances optimizes the infrastastructure in your capacity provider. Configure it to turn on or off the infrastructure optimization in your capacity provider, and to control the idle or underutilized EC2 instances optimization delay.  
*Required*: No  
*Type*: [InfrastructureOptimization](aws-properties-ecs-capacityprovider-infrastructureoptimization.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InfrastructureRoleArn`  <a name="cfn-ecs-capacityprovider-managedinstancesprovider-infrastructurerolearn"></a>
The Amazon Resource Name (ARN) of the infrastructure role that Amazon ECS assumes to manage instances. This role must include permissions for Amazon EC2 instance lifecycle management, networking, and any additional AWS services required for your workloads.  
For more information, see [Amazon ECS infrastructure IAM role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/infrastructure_IAM_role.html) in the *Amazon ECS Developer Guide*.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InstanceLaunchTemplate`  <a name="cfn-ecs-capacityprovider-managedinstancesprovider-instancelaunchtemplate"></a>
The launch template that defines how Amazon ECS launches Amazon ECS Managed Instances. This includes the instance profile for your tasks, network and storage configuration, and instance requirements that determine which Amazon EC2 instance types can be used.  
For more information, see [Store instance launch parameters in Amazon EC2 launch templates](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) in the *Amazon EC2 User Guide*.  
*Required*: Yes  
*Type*: [InstanceLaunchTemplate](aws-properties-ecs-capacityprovider-instancelaunchtemplate.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PropagateTags`  <a name="cfn-ecs-capacityprovider-managedinstancesprovider-propagatetags"></a>
Determines whether tags from the capacity provider are automatically applied to Amazon ECS Managed Instances. This helps with cost allocation and resource management by ensuring consistent tagging across your infrastructure.  
*Required*: No  
*Type*: String  
*Allowed values*: `CAPACITY_PROVIDER | NONE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider ManagedInstancesStorageConfiguration
<a name="aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration"></a>

The storage configuration for Amazon ECS Managed Instances. This defines the data volume configuration for the instances.

## Syntax
<a name="aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration-syntax.json"></a>

```
{
  "[StorageSizeGiB](#cfn-ecs-capacityprovider-managedinstancesstorageconfiguration-storagesizegib)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration-syntax.yaml"></a>

```
  [StorageSizeGiB](#cfn-ecs-capacityprovider-managedinstancesstorageconfiguration-storagesizegib): Integer
```

## Properties
<a name="aws-properties-ecs-capacityprovider-managedinstancesstorageconfiguration-properties"></a>

`StorageSizeGiB`  <a name="cfn-ecs-capacityprovider-managedinstancesstorageconfiguration-storagesizegib"></a>
The size of the data volume.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider ManagedScaling
<a name="aws-properties-ecs-capacityprovider-managedscaling"></a>

The managed scaling settings for the Auto Scaling group capacity provider.

When managed scaling is turned on, Amazon ECS manages the scale-in and scale-out actions of the Auto Scaling group. Amazon ECS manages a target tracking scaling policy using an Amazon ECS managed CloudWatch metric with the specified `targetCapacity` value as the target value for the metric. For more information, see [Using managed scaling](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/asg-capacity-providers.html#asg-capacity-providers-managed-scaling) in the *Amazon Elastic Container Service Developer Guide*.

If managed scaling is off, the user must manage the scaling of the Auto Scaling group.

## Syntax
<a name="aws-properties-ecs-capacityprovider-managedscaling-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-managedscaling-syntax.json"></a>

```
{
  "[InstanceWarmupPeriod](#cfn-ecs-capacityprovider-managedscaling-instancewarmupperiod)" : Integer,
  "[MaximumScalingStepSize](#cfn-ecs-capacityprovider-managedscaling-maximumscalingstepsize)" : Integer,
  "[MinimumScalingStepSize](#cfn-ecs-capacityprovider-managedscaling-minimumscalingstepsize)" : Integer,
  "[Status](#cfn-ecs-capacityprovider-managedscaling-status)" : String,
  "[TargetCapacity](#cfn-ecs-capacityprovider-managedscaling-targetcapacity)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-managedscaling-syntax.yaml"></a>

```
  [InstanceWarmupPeriod](#cfn-ecs-capacityprovider-managedscaling-instancewarmupperiod): Integer
  [MaximumScalingStepSize](#cfn-ecs-capacityprovider-managedscaling-maximumscalingstepsize): Integer
  [MinimumScalingStepSize](#cfn-ecs-capacityprovider-managedscaling-minimumscalingstepsize): Integer
  [Status](#cfn-ecs-capacityprovider-managedscaling-status): String
  [TargetCapacity](#cfn-ecs-capacityprovider-managedscaling-targetcapacity): Integer
```

## Properties
<a name="aws-properties-ecs-capacityprovider-managedscaling-properties"></a>

`InstanceWarmupPeriod`  <a name="cfn-ecs-capacityprovider-managedscaling-instancewarmupperiod"></a>
The period of time, in seconds, after a newly launched Amazon EC2 instance can contribute to CloudWatch metrics for Auto Scaling group. If this parameter is omitted, the default value of `300` seconds is used.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaximumScalingStepSize`  <a name="cfn-ecs-capacityprovider-managedscaling-maximumscalingstepsize"></a>
The maximum number of Amazon EC2 instances that Amazon ECS will scale out at one time. If this parameter is omitted, the default value of `10000` is used.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinimumScalingStepSize`  <a name="cfn-ecs-capacityprovider-managedscaling-minimumscalingstepsize"></a>
The minimum number of Amazon EC2 instances that Amazon ECS will scale out at one time. The scale in process is not affected by this parameter If this parameter is omitted, the default value of `1` is used.  
When additional capacity is required, Amazon ECS will scale up the minimum scaling step size even if the actual demand is less than the minimum scaling step size.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `10000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Status`  <a name="cfn-ecs-capacityprovider-managedscaling-status"></a>
Determines whether to use managed scaling for the capacity provider.  
*Required*: No  
*Type*: String  
*Allowed values*: `DISABLED | ENABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetCapacity`  <a name="cfn-ecs-capacityprovider-managedscaling-targetcapacity"></a>
The target capacity utilization as a percentage for the capacity provider. The specified value must be greater than `0` and less than or equal to `100`. For example, if you want the capacity provider to maintain 10% spare capacity, then that means the utilization is 90%, so use a `targetCapacity` of `90`. The default value of `100` percent results in the Amazon EC2 instances in your Auto Scaling group being completely used.  
*Required*: No  
*Type*: Integer  
*Minimum*: `1`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider MemoryGiBPerVCpuRequest
<a name="aws-properties-ecs-capacityprovider-memorygibpervcpurequest"></a>

The minimum and maximum amount of memory per vCPU in gibibytes (GiB). This helps ensure that instance types have the appropriate memory-to-CPU ratio for your workloads.

## Syntax
<a name="aws-properties-ecs-capacityprovider-memorygibpervcpurequest-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-memorygibpervcpurequest-syntax.json"></a>

```
{
  "[Max](#cfn-ecs-capacityprovider-memorygibpervcpurequest-max)" : Number,
  "[Min](#cfn-ecs-capacityprovider-memorygibpervcpurequest-min)" : Number
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-memorygibpervcpurequest-syntax.yaml"></a>

```
  [Max](#cfn-ecs-capacityprovider-memorygibpervcpurequest-max): Number
  [Min](#cfn-ecs-capacityprovider-memorygibpervcpurequest-min): Number
```

## Properties
<a name="aws-properties-ecs-capacityprovider-memorygibpervcpurequest-properties"></a>

`Max`  <a name="cfn-ecs-capacityprovider-memorygibpervcpurequest-max"></a>
The maximum amount of memory per vCPU in GiB. Instance types with a higher memory-to-vCPU ratio are excluded from selection.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Min`  <a name="cfn-ecs-capacityprovider-memorygibpervcpurequest-min"></a>
The minimum amount of memory per vCPU in GiB. Instance types with a lower memory-to-vCPU ratio are excluded from selection.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider MemoryMiBRequest
<a name="aws-properties-ecs-capacityprovider-memorymibrequest"></a>

The minimum and maximum amount of memory in mebibytes (MiB) for instance type selection. This ensures that selected instance types have adequate memory for your workloads.

## Syntax
<a name="aws-properties-ecs-capacityprovider-memorymibrequest-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-memorymibrequest-syntax.json"></a>

```
{
  "[Max](#cfn-ecs-capacityprovider-memorymibrequest-max)" : Integer,
  "[Min](#cfn-ecs-capacityprovider-memorymibrequest-min)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-memorymibrequest-syntax.yaml"></a>

```
  [Max](#cfn-ecs-capacityprovider-memorymibrequest-max): Integer
  [Min](#cfn-ecs-capacityprovider-memorymibrequest-min): Integer
```

## Properties
<a name="aws-properties-ecs-capacityprovider-memorymibrequest-properties"></a>

`Max`  <a name="cfn-ecs-capacityprovider-memorymibrequest-max"></a>
The maximum amount of memory in MiB. Instance types with more memory than this value are excluded from selection.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Min`  <a name="cfn-ecs-capacityprovider-memorymibrequest-min"></a>
The minimum amount of memory in MiB. Instance types with less memory than this value are excluded from selection.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider NetworkBandwidthGbpsRequest
<a name="aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest"></a>

The minimum and maximum network bandwidth in gigabits per second (Gbps) for instance type selection. This is important for network-intensive workloads.

## Syntax
<a name="aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest-syntax.json"></a>

```
{
  "[Max](#cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-max)" : Number,
  "[Min](#cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-min)" : Number
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest-syntax.yaml"></a>

```
  [Max](#cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-max): Number
  [Min](#cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-min): Number
```

## Properties
<a name="aws-properties-ecs-capacityprovider-networkbandwidthgbpsrequest-properties"></a>

`Max`  <a name="cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-max"></a>
The maximum network bandwidth in Gbps. Instance types with higher network bandwidth are excluded from selection.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Min`  <a name="cfn-ecs-capacityprovider-networkbandwidthgbpsrequest-min"></a>
The minimum network bandwidth in Gbps. Instance types with lower network bandwidth are excluded from selection.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider NetworkInterfaceCountRequest
<a name="aws-properties-ecs-capacityprovider-networkinterfacecountrequest"></a>

The minimum and maximum number of network interfaces for instance type selection. This is useful for workloads that require multiple network interfaces.

## Syntax
<a name="aws-properties-ecs-capacityprovider-networkinterfacecountrequest-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-networkinterfacecountrequest-syntax.json"></a>

```
{
  "[Max](#cfn-ecs-capacityprovider-networkinterfacecountrequest-max)" : Integer,
  "[Min](#cfn-ecs-capacityprovider-networkinterfacecountrequest-min)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-networkinterfacecountrequest-syntax.yaml"></a>

```
  [Max](#cfn-ecs-capacityprovider-networkinterfacecountrequest-max): Integer
  [Min](#cfn-ecs-capacityprovider-networkinterfacecountrequest-min): Integer
```

## Properties
<a name="aws-properties-ecs-capacityprovider-networkinterfacecountrequest-properties"></a>

`Max`  <a name="cfn-ecs-capacityprovider-networkinterfacecountrequest-max"></a>
The maximum number of network interfaces. Instance types that support more network interfaces are excluded from selection.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Min`  <a name="cfn-ecs-capacityprovider-networkinterfacecountrequest-min"></a>
The minimum number of network interfaces. Instance types that support fewer network interfaces are excluded from selection.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider Tag
<a name="aws-properties-ecs-capacityprovider-tag"></a>

The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

The following basic restrictions apply to tags:
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

## Syntax
<a name="aws-properties-ecs-capacityprovider-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-tag-syntax.json"></a>

```
{
  "[Key](#cfn-ecs-capacityprovider-tag-key)" : String,
  "[Value](#cfn-ecs-capacityprovider-tag-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-tag-syntax.yaml"></a>

```
  [Key](#cfn-ecs-capacityprovider-tag-key): String
  [Value](#cfn-ecs-capacityprovider-tag-value): String
```

## Properties
<a name="aws-properties-ecs-capacityprovider-tag-properties"></a>

`Key`  <a name="cfn-ecs-capacityprovider-tag-key"></a>
One part of a key-value pair that make up a tag. A `key` is a general label that acts like a category for more specific tag values.  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ecs-capacityprovider-tag-value"></a>
The optional part of a key-value pair that make up a tag. A `value` acts as a descriptor within a tag category (key).  
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-capacityprovider-tag--seealso"></a>
+  [Create an Amazon ECS capacity provider](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-capacityprovider.html#aws-resource-ecs-capacityprovider--examples) 

# AWS::ECS::CapacityProvider TotalLocalStorageGBRequest
<a name="aws-properties-ecs-capacityprovider-totallocalstoragegbrequest"></a>

The minimum and maximum total local storage in gigabytes (GB) for instance types with local storage. This is useful for workloads that require local storage for temporary data or caching.

## Syntax
<a name="aws-properties-ecs-capacityprovider-totallocalstoragegbrequest-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-totallocalstoragegbrequest-syntax.json"></a>

```
{
  "[Max](#cfn-ecs-capacityprovider-totallocalstoragegbrequest-max)" : Number,
  "[Min](#cfn-ecs-capacityprovider-totallocalstoragegbrequest-min)" : Number
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-totallocalstoragegbrequest-syntax.yaml"></a>

```
  [Max](#cfn-ecs-capacityprovider-totallocalstoragegbrequest-max): Number
  [Min](#cfn-ecs-capacityprovider-totallocalstoragegbrequest-min): Number
```

## Properties
<a name="aws-properties-ecs-capacityprovider-totallocalstoragegbrequest-properties"></a>

`Max`  <a name="cfn-ecs-capacityprovider-totallocalstoragegbrequest-max"></a>
The maximum total local storage in GB. Instance types with more local storage are excluded from selection.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Min`  <a name="cfn-ecs-capacityprovider-totallocalstoragegbrequest-min"></a>
The minimum total local storage in GB. Instance types with less local storage are excluded from selection.  
*Required*: No  
*Type*: Number  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::CapacityProvider VCpuCountRangeRequest
<a name="aws-properties-ecs-capacityprovider-vcpucountrangerequest"></a>

The minimum and maximum number of vCPUs for instance type selection. This allows you to specify a range of vCPU counts that meet your workload requirements.

## Syntax
<a name="aws-properties-ecs-capacityprovider-vcpucountrangerequest-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-capacityprovider-vcpucountrangerequest-syntax.json"></a>

```
{
  "[Max](#cfn-ecs-capacityprovider-vcpucountrangerequest-max)" : Integer,
  "[Min](#cfn-ecs-capacityprovider-vcpucountrangerequest-min)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-capacityprovider-vcpucountrangerequest-syntax.yaml"></a>

```
  [Max](#cfn-ecs-capacityprovider-vcpucountrangerequest-max): Integer
  [Min](#cfn-ecs-capacityprovider-vcpucountrangerequest-min): Integer
```

## Properties
<a name="aws-properties-ecs-capacityprovider-vcpucountrangerequest-properties"></a>

`Max`  <a name="cfn-ecs-capacityprovider-vcpucountrangerequest-max"></a>
The maximum number of vCPUs. Instance types with more vCPUs than this value are excluded from selection.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Min`  <a name="cfn-ecs-capacityprovider-vcpucountrangerequest-min"></a>
The minimum number of vCPUs. Instance types with fewer vCPUs than this value are excluded from selection.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Cluster
<a name="aws-resource-ecs-cluster"></a>

The `AWS::ECS::Cluster` resource creates an Amazon Elastic Container Service (Amazon ECS) cluster.

## Syntax
<a name="aws-resource-ecs-cluster-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ecs-cluster-syntax.json"></a>

```
{
  "Type" : "AWS::ECS::Cluster",
  "Properties" : {
      "[CapacityProviders](#cfn-ecs-cluster-capacityproviders)" : [ String, ... ],
      "[ClusterName](#cfn-ecs-cluster-clustername)" : String,
      "[ClusterSettings](#cfn-ecs-cluster-clustersettings)" : [ ClusterSettings, ... ],
      "[Configuration](#cfn-ecs-cluster-configuration)" : ClusterConfiguration,
      "[DefaultCapacityProviderStrategy](#cfn-ecs-cluster-defaultcapacityproviderstrategy)" : [ CapacityProviderStrategyItem, ... ],
      "[ServiceConnectDefaults](#cfn-ecs-cluster-serviceconnectdefaults)" : ServiceConnectDefaults,
      "[Tags](#cfn-ecs-cluster-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-ecs-cluster-syntax.yaml"></a>

```
Type: AWS::ECS::Cluster
Properties:
  [CapacityProviders](#cfn-ecs-cluster-capacityproviders): 
    - String
  [ClusterName](#cfn-ecs-cluster-clustername): String
  [ClusterSettings](#cfn-ecs-cluster-clustersettings): 
    - ClusterSettings
  [Configuration](#cfn-ecs-cluster-configuration): 
    ClusterConfiguration
  [DefaultCapacityProviderStrategy](#cfn-ecs-cluster-defaultcapacityproviderstrategy): 
    - CapacityProviderStrategyItem
  [ServiceConnectDefaults](#cfn-ecs-cluster-serviceconnectdefaults): 
    ServiceConnectDefaults
  [Tags](#cfn-ecs-cluster-tags): 
    - Tag
```

## Properties
<a name="aws-resource-ecs-cluster-properties"></a>

`CapacityProviders`  <a name="cfn-ecs-cluster-capacityproviders"></a>
The short name of one or more capacity providers to associate with the cluster. A capacity provider must be associated with a cluster before it can be included as part of the default capacity provider strategy of the cluster or used in a capacity provider strategy when calling the [CreateService](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateService.html) or [RunTask](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html) actions.  
If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must be created but not associated with another cluster. New Auto Scaling group capacity providers can be created with the [CreateCapacityProvider](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateCapacityProvider.html) API operation.  
To use a AWS Fargate capacity provider, specify either the `FARGATE` or `FARGATE_SPOT` capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used.  
The [PutCapacityProvider](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutCapacityProvider.html) API operation is used to update the list of available capacity providers for a cluster after the cluster is created.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ClusterName`  <a name="cfn-ecs-cluster-clustername"></a>
A user-generated string that you use to identify your cluster. If you don't specify a name, AWS CloudFormation generates a unique physical ID for the name.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ClusterSettings`  <a name="cfn-ecs-cluster-clustersettings"></a>
The settings to use when creating a cluster. This parameter is used to turn on CloudWatch Container Insights with enhanced observability or CloudWatch Container Insights for a cluster.  
Container Insights with enhanced observability provides all the Container Insights metrics, plus additional task and container metrics. This version supports enhanced observability for Amazon ECS clusters using the Amazon EC2 and Fargate launch types. After you configure Container Insights with enhanced observability on Amazon ECS, Container Insights auto-collects detailed infrastructure telemetry from the cluster level down to the container level in your environment and displays these critical performance data in curated dashboards removing the heavy lifting in observability set-up.   
For more information, see [Monitor Amazon ECS containers using Container Insights with enhanced observability](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch-container-insights.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: [Array](aws-properties-ecs-cluster-clustersettings.md) of [ClusterSettings](aws-properties-ecs-cluster-clustersettings.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Configuration`  <a name="cfn-ecs-cluster-configuration"></a>
The execute command and managed storage configuration for the cluster.  
*Required*: No  
*Type*: [ClusterConfiguration](aws-properties-ecs-cluster-clusterconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DefaultCapacityProviderStrategy`  <a name="cfn-ecs-cluster-defaultcapacityproviderstrategy"></a>
The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.  
*Required*: No  
*Type*: Array of [CapacityProviderStrategyItem](aws-properties-ecs-cluster-capacityproviderstrategyitem.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServiceConnectDefaults`  <a name="cfn-ecs-cluster-serviceconnectdefaults"></a>
Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the `enabled` parameter to `true` in the `ServiceConnectConfiguration`. You can set the namespace of each service individually in the `ServiceConnectConfiguration` to override this default parameter.  
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: [ServiceConnectDefaults](aws-properties-ecs-cluster-serviceconnectdefaults.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-ecs-cluster-tags"></a>
The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.  
The following basic restrictions apply to tags:  
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
*Required*: No  
*Type*: Array of [Tag](aws-properties-ecs-cluster-tag.md)  
*Minimum*: `0`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-ecs-cluster-return-values"></a>

### Ref
<a name="aws-resource-ecs-cluster-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name.

In the following example, the `Ref` function returns the name of the `MyECSCluster` cluster, such as `MyStack-MyECSCluster-NT5EUXTNTXXD`.

 `{ "Ref": "MyECSCluster" }` 

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-ecs-cluster-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-ecs-cluster-return-values-fn--getatt-fn--getatt"></a>

`Arn`  <a name="Arn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the Amazon ECS cluster, such as `arn:aws:ecs:us-east-2:123456789012:cluster/MyECSCluster`.

## Examples
<a name="aws-resource-ecs-cluster--examples"></a>



**Topics**
+ [Create a cluster with Fargate capacity providers and a default capacity provider strategy](#aws-resource-ecs-cluster--examples--Create_a_cluster_with_Fargate_capacity_providers_and_a_default_capacity_provider_strategy)
+ [Create a cluster with the Amazon Linux 2023 ECS-Optimized-AMI](#aws-resource-ecs-cluster--examples--Create_a_cluster_with_the_Amazon_Linux_2023_ECS-Optimized-AMI)
+ [Create an empty cluster with CloudWatch Container Insights enabled and defined tags](#aws-resource-ecs-cluster--examples--Create_an_empty_cluster_with_CloudWatch_Container_Insights_enabled_and_defined_tags)

### Create a cluster with Fargate capacity providers and a default capacity provider strategy
<a name="aws-resource-ecs-cluster--examples--Create_a_cluster_with_Fargate_capacity_providers_and_a_default_capacity_provider_strategy"></a>

The following example creates a cluster named `MyFargateCluster` with the `FARGATE` and `FARGATE_SPOT` capacity providers. A default capacity provider strategy is also created where tasks launched will be split evenly between the `FARGATE` and `FARGATE_SPOT` capacity providers. The template also enables ECS Exec using the default logging configuration. For more information, see [Monitor Amazon ECS containers with ECS Exec](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-exec.html) in the *Amazon ECS Developer Guide*.

#### JSON
<a name="aws-resource-ecs-cluster--examples--Create_a_cluster_with_Fargate_capacity_providers_and_a_default_capacity_provider_strategy--json"></a>

```
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Resources": {
    "ECSCluster": {
      "Type": "AWS::ECS::Cluster",
      "Properties": {
        "ClusterName": "MyFargateCluster",
        "CapacityProviders": ["FARGATE", "FARGATE_SPOT"],
        "DefaultCapacityProviderStrategy": [
          {
            "CapacityProvider": "FARGATE",
            "Weight": 1
          },
          {
            "CapacityProvider": "FARGATE_SPOT",
            "Weight": 1
          }
        ],
        "Configuration": {
          "ExecuteCommandConfiguration": {
            "Logging": "DEFAULT"
          }
        }
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-ecs-cluster--examples--Create_a_cluster_with_Fargate_capacity_providers_and_a_default_capacity_provider_strategy--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
  ECSCluster:
    Type: AWS::ECS::Cluster
    Properties:
      ClusterName: MyFargateCluster
      CapacityProviders:
        - FARGATE
        - FARGATE_SPOT
      DefaultCapacityProviderStrategy:
        - CapacityProvider: FARGATE
          Weight: 1
        - CapacityProvider: FARGATE_SPOT
          Weight: 1
      Configuration:
        ExecuteCommandConfiguration:
          Logging: DEFAULT
```

### Create a cluster with the Amazon Linux 2023 ECS-Optimized-AMI
<a name="aws-resource-ecs-cluster--examples--Create_a_cluster_with_the_Amazon_Linux_2023_ECS-Optimized-AMI"></a>

The following example creates a cluster named `MyCluster` with a capacity provider that launches Amazon Linux 2023 t2.medium instances. Replace parameters with your own information.

#### JSON
<a name="aws-resource-ecs-cluster--examples--Create_a_cluster_with_the_Amazon_Linux_2023_ECS-Optimized-AMI--json"></a>

```
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "EC2 ECS cluster that starts out empty, with no EC2 instances yet. An ECS capacity provider automatically launches more EC2 instances as required on the fly when you request ECS to launch services or standalone tasks.",
  "Parameters": {
      "InstanceType": {
          "Type": "String",
          "Description": "EC2 instance type",
          "Default": "t2.medium",
          "AllowedValues": [
              "t1.micro",
              "t2.2xlarge",
              "t2.large",
              "t2.medium",
              "t2.micro",
              "t2.nano",
              "t2.small",
              "t2.xlarge",
              "t3.2xlarge",
              "t3.large",
              "t3.medium",
              "t3.micro",
              "t3.nano",
              "t3.small",
              "t3.xlarge"
          ]
      },
      "DesiredCapacity": {
          "Type": "Number",
          "Default": "0",
          "Description": "Number of EC2 instances to launch in your ECS cluster."
      },
      "MaxSize": {
          "Type": "Number",
          "Default": "100",
          "Description": "Maximum number of EC2 instances that can be launched in your ECS cluster."
      },
      "ECSAMI": {
          "Description": "The Amazon Machine Image ID used for the cluster",
          "Type": "AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>",
          "Default": "/aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id"
      },
      "VpcId": {
          "Type": "AWS::EC2::VPC::Id",
          "Description": "VPC ID where the ECS cluster is launched",
          "Default": "vpc-1234567890abcdef0"
      },
      "SubnetIds": {
          "Type": "List<AWS::EC2::Subnet::Id>",
          "Description": "List of subnet IDs where the EC2 instances will be launched",
          "Default": "subnet-021345abcdef67890"
      }
  },
  "Resources": {
      "ECSCluster": {
          "Type": "AWS::ECS::Cluster",
          "Properties": {
              "ClusterSettings": [
                  {
                      "Name": "containerInsights",
                      "Value": "enabled"
                  }
              ]
          }
      },
      "ECSAutoScalingGroup": {
          "Type": "AWS::AutoScaling::AutoScalingGroup",
          "DependsOn": [
              "ECSCluster",
              "EC2Role"
          ],
          "Properties": {
              "VPCZoneIdentifier": {
                  "Ref": "SubnetIds"
              },
              "LaunchTemplate": {
                  "LaunchTemplateId": {
                      "Ref": "ContainerInstances"
                  },
                  "Version": {
                      "Fn::GetAtt": [
                          "ContainerInstances",
                          "LatestVersionNumber"
                      ]
                  }
              },
              "MinSize": 0,
              "MaxSize": {
                  "Ref": "MaxSize"
              },
              "DesiredCapacity": {
                  "Ref": "DesiredCapacity"
              },
              "NewInstancesProtectedFromScaleIn": true
          },
          "UpdatePolicy": {
              "AutoScalingReplacingUpdate": {
                  "WillReplace": "true"
              }
          }
      },
      "ContainerInstances": {
          "Type": "AWS::EC2::LaunchTemplate",
          "Properties": {
              "LaunchTemplateName": "asg-launch-template",
              "LaunchTemplateData": {
                  "ImageId": {
                      "Ref": "ECSAMI"
                  },
                  "InstanceType": {
                      "Ref": "InstanceType"
                  },
                  "IamInstanceProfile": {
                      "Name": {
                          "Ref": "EC2InstanceProfile"
                      }
                  },
                  "SecurityGroupIds": [
                      {
                          "Ref": "ContainerHostSecurityGroup"
                      }
                  ],
                  "UserData": {
                      "Fn::Base64": {
                          "Fn::Sub": "#!/bin/bash -xe\n echo ECS_CLUSTER=${ECSCluster} >> /etc/ecs/ecs.config\n yum install -y aws-cfn-bootstrap\n /opt/aws/bin/cfn-init -v --stack ${AWS::StackId} --resource ContainerInstances --configsets full_install --region ${AWS::Region} &\n"
                      }
                  },
                  "MetadataOptions": {
                      "HttpEndpoint": "enabled",
                      "HttpTokens": "required"
                  }
              }
          }
      },
      "EC2InstanceProfile": {
          "Type": "AWS::IAM::InstanceProfile",
          "Properties": {
              "Path": "/",
              "Roles": [
                  {
                      "Ref": "EC2Role"
                  }
              ]
          }
      },
      "CapacityProvider": {
          "Type": "AWS::ECS::CapacityProvider",
          "Properties": {
              "AutoScalingGroupProvider": {
                  "AutoScalingGroupArn": {
                      "Ref": "ECSAutoScalingGroup"
                  },
                  "ManagedScaling": {
                      "InstanceWarmupPeriod": 60,
                      "MinimumScalingStepSize": 1,
                      "MaximumScalingStepSize": 100,
                      "Status": "ENABLED",
                      "TargetCapacity": 100
                  },
                  "ManagedTerminationProtection": "ENABLED"
              }
          }
      },
      "CapacityProviderAssociation": {
          "Type": "AWS::ECS::ClusterCapacityProviderAssociations",
          "Properties": {
              "CapacityProviders": [
                  {
                      "Ref": "CapacityProvider"
                  }
              ],
              "Cluster": {
                  "Ref": "ECSCluster"
              },
              "DefaultCapacityProviderStrategy": [
                  {
                      "Base": 0,
                      "CapacityProvider": {
                          "Ref": "CapacityProvider"
                      },
                      "Weight": 1
                  }
              ]
          }
      },
      "ContainerHostSecurityGroup": {
          "Type": "AWS::EC2::SecurityGroup",
          "Properties": {
              "GroupDescription": "Access to the EC2 hosts that run containers",
              "VpcId": {
                  "Ref": "VpcId"
              }
          }
      },
      "EC2Role": {
          "Type": "AWS::IAM::Role",
          "Properties": {
              "AssumeRolePolicyDocument": {
                  "Statement": [
                      {
                          "Effect": "Allow",
                          "Principal": {
                              "Service": [
                                  "ec2.amazonaws.com"
                              ]
                          },
                          "Action": [
                              "sts:AssumeRole"
                          ]
                      }
                  ]
              },
              "Path": "/",
              "ManagedPolicyArns": [
                  "arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role",
                  "arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore"
              ]
          }
      },
      "ECSTaskExecutionRole": {
          "Type": "AWS::IAM::Role",
          "Properties": {
              "AssumeRolePolicyDocument": {
                  "Statement": [
                      {
                          "Effect": "Allow",
                          "Principal": {
                              "Service": [
                                  "ecs-tasks.amazonaws.com"
                              ]
                          },
                          "Action": [
                              "sts:AssumeRole"
                          ],
                          "Condition": {
                              "ArnLike": {
                                  "aws:SourceArn": {
                                      "Fn::Sub": "arn:${AWS::Partition}:ecs:${AWS::Region}:${AWS::AccountId}:*"
                                  }
                              },
                              "StringEquals": {
                                  "aws:SourceAccount": {
                                        "Fn::Sub": "${AWS::AccountId}"
                                    }
                              }
                          }
                      }
                  ]
              },
              "Path": "/",
              "ManagedPolicyArns": [
                  "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"
              ]
          }
      }
  },
  "Outputs": {
      "ClusterName": {
          "Description": "The ECS cluster into which to launch resources",
          "Value": "ECSCluster"
      },
      "ECSTaskExecutionRole": {
          "Description": "The role used to start up a task",
          "Value": "ECSTaskExecutionRole"
      },
      "CapacityProvider": {
          "Description": "The cluster capacity provider that the service should use to request capacity when it wants to start up a task",
          "Value": "CapacityProvider"
      }
  }
}
```

#### YAML
<a name="aws-resource-ecs-cluster--examples--Create_a_cluster_with_the_Amazon_Linux_2023_ECS-Optimized-AMI--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Description: EC2 ECS cluster that starts out empty, with no EC2 instances yet.
  An ECS capacity provider automatically launches more EC2 instances as required
  on the fly when you request ECS to launch services or standalone tasks.
Parameters:
  InstanceType:
    Type: String
    Description: EC2 instance type
    Default: "t2.medium"
    AllowedValues:
      - t1.micro
      - t2.2xlarge
      - t2.large
      - t2.medium
      - t2.micro
      - t2.nano
      - t2.small
      - t2.xlarge
      - t3.2xlarge
      - t3.large
      - t3.medium
      - t3.micro
      - t3.nano
      - t3.small
      - t3.xlarge
  DesiredCapacity:
    Type: Number
    Default: "0"
    Description: Number of EC2 instances to launch in your ECS cluster.
  MaxSize:
    Type: Number
    Default: "100"
    Description: Maximum number of EC2 instances that can be launched in your ECS cluster.
  ECSAMI:
    Description: The Amazon Machine Image ID used for the cluster
    Type: AWS::SSM::Parameter::Value<AWS::EC2::Image::Id>
    Default: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id
  VpcId:
    Type: AWS::EC2::VPC::Id
    Description: VPC ID where the ECS cluster is launched
    Default: vpc-1234567890abcdef0
  SubnetIds:
    Type: List<AWS::EC2::Subnet::Id>
    Description: List of subnet IDs where the EC2 instances will be launched
    Default: "subnet-021345abcdef67890"
Resources:
# This is authorizes ECS to manage resources on your
  # account on your behalf. This role is likely already created on your account
  # ECSRole:
  #  Type: AWS::IAM::ServiceLinkedRole
  #  Properties:
  #    AWSServiceName: 'ecs.amazonaws.com'
  
   # ECS Resources
  ECSCluster:
    Type: AWS::ECS::Cluster
    Properties:
      ClusterSettings:
        - Name: containerInsights
          Value: enabled
  
  # Autoscaling group. This launches the actual EC2 instances that will register
  # themselves as members of the cluster, and run the docker containers.
  ECSAutoScalingGroup:
    Type: AWS::AutoScaling::AutoScalingGroup
    DependsOn:
      # This is to ensure that the ASG gets deleted first before these
    # resources, when it comes to stack teardown.
      - ECSCluster
      - EC2Role
    Properties:
      VPCZoneIdentifier:
        Ref: SubnetIds
      LaunchTemplate:
        LaunchTemplateId: !Ref ContainerInstances
        Version: !GetAtt ContainerInstances.LatestVersionNumber
      MinSize: 0
      MaxSize:
        Ref: MaxSize
      DesiredCapacity:
        Ref: DesiredCapacity
      NewInstancesProtectedFromScaleIn: true
    UpdatePolicy:
      AutoScalingReplacingUpdate:
        WillReplace: "true"
  # The config for each instance that is added to the cluster
  ContainerInstances:
    Type: AWS::EC2::LaunchTemplate
    Properties:
      LaunchTemplateName: "asg-launch-template"
      LaunchTemplateData:
        ImageId:
          Ref: ECSAMI
        InstanceType:
          Ref: InstanceType
        IamInstanceProfile:
          Name: !Ref EC2InstanceProfile
        SecurityGroupIds:
          - !Ref ContainerHostSecurityGroup
        # This injected configuration file is how the EC2 instance
      # knows which ECS cluster on your AWS account it should be joining
        UserData:
          Fn::Base64: !Sub |
           #!/bin/bash -xe
            echo ECS_CLUSTER=${ECSCluster} >> /etc/ecs/ecs.config
            yum install -y aws-cfn-bootstrap
            /opt/aws/bin/cfn-init -v --stack ${AWS::StackId} --resource ContainerInstances --configsets full_install --region ${AWS::Region} &
         # Disable IMDSv1, and require IMDSv2
        MetadataOptions:
          HttpEndpoint: enabled
          HttpTokens: required
  EC2InstanceProfile:
    Type: AWS::IAM::InstanceProfile
    Properties:
      Path: /
      Roles: 
      - !Ref EC2Role 
  # Create an ECS capacity provider to attach the ASG to the ECS cluster
  # so that it autoscales as we launch more containers
  CapacityProvider:
    Type: AWS::ECS::CapacityProvider
    Properties:
      AutoScalingGroupProvider:
        AutoScalingGroupArn: !Ref ECSAutoScalingGroup
        ManagedScaling:
          InstanceWarmupPeriod: 60
          MinimumScalingStepSize: 1
          MaximumScalingStepSize: 100
          Status: ENABLED
          # Percentage of cluster reservation to try to maintain
          TargetCapacity: 100
        ManagedTerminationProtection: ENABLED
   # Create a cluster capacity provider assocation so that the cluster
  # will use the capacity provider
  CapacityProviderAssociation:
    Type: AWS::ECS::ClusterCapacityProviderAssociations
    Properties:
      CapacityProviders:
        - !Ref CapacityProvider
      Cluster: !Ref ECSCluster
      DefaultCapacityProviderStrategy:
        - Base: 0
          CapacityProvider: !Ref CapacityProvider
          Weight: 1
  # A security group for the EC2 hosts that will run the containers.
  # This can be used to limit incoming traffic to or outgoing traffic
  # from the container's host EC2 instance.
  ContainerHostSecurityGroup:
    Type: AWS::EC2::SecurityGroup
    Properties:
      GroupDescription: Access to the EC2 hosts that run containers
      VpcId:
        Ref: VpcId
  # Role for the EC2 hosts. This allows the ECS agent on the EC2 hosts
  # to communciate with the ECS control plane, as well as download the docker
  # images from ECR to run on your host.
  EC2Role:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - ec2.amazonaws.com
            Action:
              - sts:AssumeRole
      Path: /
      ManagedPolicyArns:
      # See reference: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security-iam-awsmanpol.html#security-iam-awsmanpol-AmazonEC2ContainerServiceforEC2Role
        - arn:aws:iam::aws:policy/service-role/AmazonEC2ContainerServiceforEC2Role
      # This managed policy allows us to connect to the instance using SSM
        - arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
  # This is a role which is used within Fargate to allow the Fargate agent
  # to download images, and upload logs.
  ECSTaskExecutionRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument:
        Statement:
          - Effect: Allow
            Principal:
              Service:
                - ecs-tasks.amazonaws.com
            Action:
              - sts:AssumeRole
            Condition:
              ArnLike:
                aws:SourceArn: !Sub arn:${AWS::Partition}:ecs:${AWS::Region}:${AWS::AccountId}:*
              StringEquals:
                aws:SourceAccount: !Sub ${AWS::AccountId}
      Path: /
      # This role enables all features of ECS. See reference:
    # https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security-iam-awsmanpol.html#security-iam-awsmanpol-AmazonECSTaskExecutionRolePolicy
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy
Outputs:
  ClusterName:
    Description: The ECS cluster into which to launch resources
    Value: ECSCluster
  ECSTaskExecutionRole:
    Description: The role used to start up a task
    Value: ECSTaskExecutionRole
  CapacityProvider:
    Description: The cluster capacity provider that the service should use to
      request capacity when it wants to start up a task
    Value: CapacityProvider
```

### Create an empty cluster with CloudWatch Container Insights enabled and defined tags
<a name="aws-resource-ecs-cluster--examples--Create_an_empty_cluster_with_CloudWatch_Container_Insights_enabled_and_defined_tags"></a>

The following example creates an empty cluster named `MyCluster` that has CloudWatch Container Insights enabled and is tagged with the key `environment` and the value `production`.

#### JSON
<a name="aws-resource-ecs-cluster--examples--Create_an_empty_cluster_with_CloudWatch_Container_Insights_enabled_and_defined_tags--json"></a>

```
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Resources": {
    "ECSCluster": {
        "Type": "AWS::ECS::Cluster",
        "Properties": {
            "ClusterName": "MyCluster",
            "ClusterSettings": [
                {
                    "Name": "containerInsights",
                    "Value": "enabled"
                }
            ],
            "Tags": [
                {
                    "Key": "environment",
                    "Value": "production"
                }
            ]
        }
    }
  }
}
```

#### YAML
<a name="aws-resource-ecs-cluster--examples--Create_an_empty_cluster_with_CloudWatch_Container_Insights_enabled_and_defined_tags--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
  ECSCluster:
    Type: AWS::ECS::Cluster
    Properties:
      ClusterName: MyCluster
      ClusterSettings:
        - Name: containerInsights
          Value: enabled
      Tags:
        - Key: environment
          Value: production
```

# AWS::ECS::Cluster CapacityProviderStrategyItem
<a name="aws-properties-ecs-cluster-capacityproviderstrategyitem"></a>

The `CapacityProviderStrategyItem` property specifies the details of the default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

## Syntax
<a name="aws-properties-ecs-cluster-capacityproviderstrategyitem-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-cluster-capacityproviderstrategyitem-syntax.json"></a>

```
{
  "[Base](#cfn-ecs-cluster-capacityproviderstrategyitem-base)" : Integer,
  "[CapacityProvider](#cfn-ecs-cluster-capacityproviderstrategyitem-capacityprovider)" : String,
  "[Weight](#cfn-ecs-cluster-capacityproviderstrategyitem-weight)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-cluster-capacityproviderstrategyitem-syntax.yaml"></a>

```
  [Base](#cfn-ecs-cluster-capacityproviderstrategyitem-base): Integer
  [CapacityProvider](#cfn-ecs-cluster-capacityproviderstrategyitem-capacityprovider): String
  [Weight](#cfn-ecs-cluster-capacityproviderstrategyitem-weight): Integer
```

## Properties
<a name="aws-properties-ecs-cluster-capacityproviderstrategyitem-properties"></a>

`Base`  <a name="cfn-ecs-cluster-capacityproviderstrategyitem-base"></a>
The *base* value designates how many tasks, at a minimum, to run on the specified capacity provider for each service. Only one capacity provider in a capacity provider strategy can have a *base* defined. If no value is specified, the default value of `0` is used.  
Base value characteristics:  
+ Only one capacity provider in a strategy can have a base defined
+ The default value is `0` if not specified
+ The valid range is 0 to 100,000
+ Base requirements are satisfied first before weight distribution
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `100000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CapacityProvider`  <a name="cfn-ecs-cluster-capacityproviderstrategyitem-capacityprovider"></a>
The short name of the capacity provider. This can be either an AWS managed capacity provider (`FARGATE` or `FARGATE_SPOT`) or the name of a custom capacity provider that you created.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Weight`  <a name="cfn-ecs-cluster-capacityproviderstrategyitem-weight"></a>
The *weight* value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The `weight` value is taken into consideration after the `base` value, if defined, is satisfied.  
If no `weight` value is specified, the default value of `0` is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of `0` can't be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of `0`, any `RunTask` or `CreateService` actions using the capacity provider strategy will fail.  
Weight value characteristics:  
+ Weight is considered after the base value is satisfied
+ The default value is `0` if not specified
+ The valid range is 0 to 1,000
+ At least one capacity provider must have a weight greater than zero
+ Capacity providers with weight of `0` cannot place tasks
Task distribution logic:  

1. Base satisfaction: The minimum number of tasks specified by the base value are placed on that capacity provider

1. Weight distribution: After base requirements are met, additional tasks are distributed according to weight ratios
Examples:  
Equal Distribution: Two capacity providers both with weight `1` will split tasks evenly after base requirements are met.  
Weighted Distribution: If capacityProviderA has weight `1` and capacityProviderB has weight `4`, then for every 1 task on A, 4 tasks will run on B.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `1000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-cluster-capacityproviderstrategyitem--seealso"></a>
+  [ Define a cluster with the AWS Fargate capacity providers and a default capacity provider strategy defined](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#aws-resource-ecs-cluster--examples--Define_a_cluster_with_the__capacity_providers_and_a_default_capacity_provider_strategy_defined) 

# AWS::ECS::Cluster ClusterConfiguration
<a name="aws-properties-ecs-cluster-clusterconfiguration"></a>

The execute command and managed storage configuration for the cluster.

## Syntax
<a name="aws-properties-ecs-cluster-clusterconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-cluster-clusterconfiguration-syntax.json"></a>

```
{
  "[ExecuteCommandConfiguration](#cfn-ecs-cluster-clusterconfiguration-executecommandconfiguration)" : ExecuteCommandConfiguration,
  "[ManagedStorageConfiguration](#cfn-ecs-cluster-clusterconfiguration-managedstorageconfiguration)" : ManagedStorageConfiguration
}
```

### YAML
<a name="aws-properties-ecs-cluster-clusterconfiguration-syntax.yaml"></a>

```
  [ExecuteCommandConfiguration](#cfn-ecs-cluster-clusterconfiguration-executecommandconfiguration): 
    ExecuteCommandConfiguration
  [ManagedStorageConfiguration](#cfn-ecs-cluster-clusterconfiguration-managedstorageconfiguration): 
    ManagedStorageConfiguration
```

## Properties
<a name="aws-properties-ecs-cluster-clusterconfiguration-properties"></a>

`ExecuteCommandConfiguration`  <a name="cfn-ecs-cluster-clusterconfiguration-executecommandconfiguration"></a>
The details of the execute command configuration.  
*Required*: No  
*Type*: [ExecuteCommandConfiguration](aws-properties-ecs-cluster-executecommandconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ManagedStorageConfiguration`  <a name="cfn-ecs-cluster-clusterconfiguration-managedstorageconfiguration"></a>
The details of the managed storage configuration.  
*Required*: No  
*Type*: [ManagedStorageConfiguration](aws-properties-ecs-cluster-managedstorageconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-cluster-clusterconfiguration--seealso"></a>
+  [ Define a cluster with the AWS Fargate capacity providers and a default capacity provider strategy defined](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#aws-resource-ecs-cluster--examples--Define_a_cluster_with_the__capacity_providers_and_a_default_capacity_provider_strategy_defined) 

# AWS::ECS::Cluster ClusterSettings
<a name="aws-properties-ecs-cluster-clustersettings"></a>

The settings to use when creating a cluster. This parameter is used to turn on CloudWatch Container Insights with enhanced observability or CloudWatch Container Insights for a cluster.

Container Insights with enhanced observability provides all the Container Insights metrics, plus additional task and container metrics. This version supports enhanced observability for Amazon ECS clusters using the Amazon EC2 and Fargate launch types. After you configure Container Insights with enhanced observability on Amazon ECS, Container Insights auto-collects detailed infrastructure telemetry from the cluster level down to the container level in your environment and displays these critical performance data in curated dashboards removing the heavy lifting in observability set-up. 

For more information, see [Monitor Amazon ECS containers using Container Insights with enhanced observability](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cloudwatch-container-insights.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-cluster-clustersettings-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-cluster-clustersettings-syntax.json"></a>

```
{
  "[Name](#cfn-ecs-cluster-clustersettings-name)" : String,
  "[Value](#cfn-ecs-cluster-clustersettings-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-cluster-clustersettings-syntax.yaml"></a>

```
  [Name](#cfn-ecs-cluster-clustersettings-name): String
  [Value](#cfn-ecs-cluster-clustersettings-value): String
```

## Properties
<a name="aws-properties-ecs-cluster-clustersettings-properties"></a>

`Name`  <a name="cfn-ecs-cluster-clustersettings-name"></a>
The name of the cluster setting. The value is `containerInsights`.  
*Required*: No  
*Type*: String  
*Allowed values*: `containerInsights`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ecs-cluster-clustersettings-value"></a>
The value to set for the cluster setting. The supported values are `enhanced`, `enabled`, and `disabled`.   
To use Container Insights with enhanced observability, set the `containerInsights` account setting to `enhanced`.  
To use Container Insights, set the `containerInsights` account setting to `enabled`.  
If a cluster value is specified, it will override the `containerInsights` value set with [PutAccountSetting](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSetting.html) or [PutAccountSettingDefault](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutAccountSettingDefault.html).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-cluster-clustersettings--seealso"></a>
+  [Define an empty cluster with CloudWatch Container Insights enabled and defined tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#ws-resource-ecs-cluster--examples--Define_an_empty_cluster_with_CloudWatch_Container_Insights_enabled_and_defined_tags) 

# AWS::ECS::Cluster ExecuteCommandConfiguration
<a name="aws-properties-ecs-cluster-executecommandconfiguration"></a>

The details of the execute command configuration.

## Syntax
<a name="aws-properties-ecs-cluster-executecommandconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-cluster-executecommandconfiguration-syntax.json"></a>

```
{
  "[KmsKeyId](#cfn-ecs-cluster-executecommandconfiguration-kmskeyid)" : String,
  "[LogConfiguration](#cfn-ecs-cluster-executecommandconfiguration-logconfiguration)" : ExecuteCommandLogConfiguration,
  "[Logging](#cfn-ecs-cluster-executecommandconfiguration-logging)" : String
}
```

### YAML
<a name="aws-properties-ecs-cluster-executecommandconfiguration-syntax.yaml"></a>

```
  [KmsKeyId](#cfn-ecs-cluster-executecommandconfiguration-kmskeyid): String
  [LogConfiguration](#cfn-ecs-cluster-executecommandconfiguration-logconfiguration): 
    ExecuteCommandLogConfiguration
  [Logging](#cfn-ecs-cluster-executecommandconfiguration-logging): String
```

## Properties
<a name="aws-properties-ecs-cluster-executecommandconfiguration-properties"></a>

`KmsKeyId`  <a name="cfn-ecs-cluster-executecommandconfiguration-kmskeyid"></a>
Specify an AWS Key Management Service key ID to encrypt the data between the local client and the container.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogConfiguration`  <a name="cfn-ecs-cluster-executecommandconfiguration-logconfiguration"></a>
The log configuration for the results of the execute command actions. The logs can be sent to CloudWatch Logs or an Amazon S3 bucket. When `logging=OVERRIDE` is specified, a `logConfiguration` must be provided.  
*Required*: No  
*Type*: [ExecuteCommandLogConfiguration](aws-properties-ecs-cluster-executecommandlogconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Logging`  <a name="cfn-ecs-cluster-executecommandconfiguration-logging"></a>
The log setting to use for redirecting logs for your execute command results. The following log settings are available.  
+ `NONE`: The execute command session is not logged.
+ `DEFAULT`: The `awslogs` configuration in the task definition is used. If no logging parameter is specified, it defaults to this value. If no `awslogs` log driver is configured in the task definition, the output won't be logged.
+ `OVERRIDE`: Specify the logging details as a part of `logConfiguration`. If the `OVERRIDE` logging option is specified, the `logConfiguration` is required.
*Required*: No  
*Type*: String  
*Allowed values*: `NONE | DEFAULT | OVERRIDE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-cluster-executecommandconfiguration--seealso"></a>
+  [ Define a cluster with the AWS Fargate capacity providers and a default capacity provider strategy defined](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#aws-resource-ecs-cluster--examples--Define_a_cluster_with_the__capacity_providers_and_a_default_capacity_provider_strategy_defined) 

# AWS::ECS::Cluster ExecuteCommandLogConfiguration
<a name="aws-properties-ecs-cluster-executecommandlogconfiguration"></a>

The log configuration for the results of the execute command actions. The logs can be sent to CloudWatch Logs or an Amazon S3 bucket.

## Syntax
<a name="aws-properties-ecs-cluster-executecommandlogconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-cluster-executecommandlogconfiguration-syntax.json"></a>

```
{
  "[CloudWatchEncryptionEnabled](#cfn-ecs-cluster-executecommandlogconfiguration-cloudwatchencryptionenabled)" : Boolean,
  "[CloudWatchLogGroupName](#cfn-ecs-cluster-executecommandlogconfiguration-cloudwatchloggroupname)" : String,
  "[S3BucketName](#cfn-ecs-cluster-executecommandlogconfiguration-s3bucketname)" : String,
  "[S3EncryptionEnabled](#cfn-ecs-cluster-executecommandlogconfiguration-s3encryptionenabled)" : Boolean,
  "[S3KeyPrefix](#cfn-ecs-cluster-executecommandlogconfiguration-s3keyprefix)" : String
}
```

### YAML
<a name="aws-properties-ecs-cluster-executecommandlogconfiguration-syntax.yaml"></a>

```
  [CloudWatchEncryptionEnabled](#cfn-ecs-cluster-executecommandlogconfiguration-cloudwatchencryptionenabled): Boolean
  [CloudWatchLogGroupName](#cfn-ecs-cluster-executecommandlogconfiguration-cloudwatchloggroupname): String
  [S3BucketName](#cfn-ecs-cluster-executecommandlogconfiguration-s3bucketname): String
  [S3EncryptionEnabled](#cfn-ecs-cluster-executecommandlogconfiguration-s3encryptionenabled): Boolean
  [S3KeyPrefix](#cfn-ecs-cluster-executecommandlogconfiguration-s3keyprefix): String
```

## Properties
<a name="aws-properties-ecs-cluster-executecommandlogconfiguration-properties"></a>

`CloudWatchEncryptionEnabled`  <a name="cfn-ecs-cluster-executecommandlogconfiguration-cloudwatchencryptionenabled"></a>
Determines whether to use encryption on the CloudWatch logs. If not specified, encryption will be off.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CloudWatchLogGroupName`  <a name="cfn-ecs-cluster-executecommandlogconfiguration-cloudwatchloggroupname"></a>
The name of the CloudWatch log group to send logs to.  
The CloudWatch log group must already be created.
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3BucketName`  <a name="cfn-ecs-cluster-executecommandlogconfiguration-s3bucketname"></a>
The name of the S3 bucket to send logs to.  
The S3 bucket must already be created.
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3EncryptionEnabled`  <a name="cfn-ecs-cluster-executecommandlogconfiguration-s3encryptionenabled"></a>
Determines whether to use encryption on the S3 logs. If not specified, encryption is not used.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`S3KeyPrefix`  <a name="cfn-ecs-cluster-executecommandlogconfiguration-s3keyprefix"></a>
An optional folder in the S3 bucket to place logs in.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-cluster-executecommandlogconfiguration--seealso"></a>
+  [ Define a cluster with the AWS Fargate capacity providers and a default capacity provider strategy defined](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#aws-resource-ecs-cluster--examples--Define_a_cluster_with_the__capacity_providers_and_a_default_capacity_provider_strategy_defined) 

# AWS::ECS::Cluster ManagedStorageConfiguration
<a name="aws-properties-ecs-cluster-managedstorageconfiguration"></a>

The managed storage configuration for the cluster.

## Syntax
<a name="aws-properties-ecs-cluster-managedstorageconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-cluster-managedstorageconfiguration-syntax.json"></a>

```
{
  "[FargateEphemeralStorageKmsKeyId](#cfn-ecs-cluster-managedstorageconfiguration-fargateephemeralstoragekmskeyid)" : String,
  "[KmsKeyId](#cfn-ecs-cluster-managedstorageconfiguration-kmskeyid)" : String
}
```

### YAML
<a name="aws-properties-ecs-cluster-managedstorageconfiguration-syntax.yaml"></a>

```
  [FargateEphemeralStorageKmsKeyId](#cfn-ecs-cluster-managedstorageconfiguration-fargateephemeralstoragekmskeyid): String
  [KmsKeyId](#cfn-ecs-cluster-managedstorageconfiguration-kmskeyid): String
```

## Properties
<a name="aws-properties-ecs-cluster-managedstorageconfiguration-properties"></a>

`FargateEphemeralStorageKmsKeyId`  <a name="cfn-ecs-cluster-managedstorageconfiguration-fargateephemeralstoragekmskeyid"></a>
Specify the AWS Key Management Service key ID for Fargate ephemeral storage.  
When you specify a `fargateEphemeralStorageKmsKeyId`, AWS Fargate uses the key to encrypt data at rest in ephemeral storage. For more information about Fargate ephemeral storage encryption, see [Customer managed keys for AWS Fargate ephemeral storage for Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/fargate-storage-encryption.html) in the *Amazon Elastic Container Service Developer Guide*.  
The key must be a single Region key.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KmsKeyId`  <a name="cfn-ecs-cluster-managedstorageconfiguration-kmskeyid"></a>
Specify a AWS Key Management Service key ID to encrypt Amazon ECS managed storage.  
 When you specify a `kmsKeyId`, Amazon ECS uses the key to encrypt data volumes managed by Amazon ECS that are attached to tasks in the cluster. The following data volumes are managed by Amazon ECS: Amazon EBS. For more information about encryption of Amazon EBS volumes attached to Amazon ECS tasks, see [Encrypt data stored in Amazon EBS volumes for Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-kms-encryption.html) in the *Amazon Elastic Container Service Developer Guide*.  
The key must be a single Region key.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Cluster ServiceConnectDefaults
<a name="aws-properties-ecs-cluster-serviceconnectdefaults"></a>

Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the `enabled` parameter to `true` in the `ServiceConnectConfiguration`. You can set the namespace of each service individually in the `ServiceConnectConfiguration` to override this default parameter.

Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-cluster-serviceconnectdefaults-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-cluster-serviceconnectdefaults-syntax.json"></a>

```
{
  "[Namespace](#cfn-ecs-cluster-serviceconnectdefaults-namespace)" : String
}
```

### YAML
<a name="aws-properties-ecs-cluster-serviceconnectdefaults-syntax.yaml"></a>

```
  [Namespace](#cfn-ecs-cluster-serviceconnectdefaults-namespace): String
```

## Properties
<a name="aws-properties-ecs-cluster-serviceconnectdefaults-properties"></a>

`Namespace`  <a name="cfn-ecs-cluster-serviceconnectdefaults-namespace"></a>
The namespace name or full Amazon Resource Name (ARN) of the AWS Cloud Map namespace that's used when you create a service and don't specify a Service Connect configuration. The namespace name can include up to 1024 characters. The name is case-sensitive. The name can't include greater than (>), less than (<), double quotation marks ("), or slash (/).  
If you enter an existing namespace name or ARN, then that namespace will be used. Any namespace type is supported. The namespace must be in this account and this AWS Region.  
If you enter a new name, a AWS Cloud Map namespace will be created. Amazon ECS creates a AWS Cloud Map namespace with the "API calls" method of instance discovery only. This instance discovery method is the "HTTP" namespace type in the AWS Command Line Interface. Other types of instance discovery aren't used by Service Connect.  
If you update the cluster with an empty string `""` for the namespace name, the cluster configuration for Service Connect is removed. Note that the namespace will remain in AWS Cloud Map and must be deleted separately.  
For more information about AWS Cloud Map, see [Working with Services](https://docs.aws.amazon.com/cloud-map/latest/dg/working-with-services.html) in the *AWS Cloud Map Developer Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Cluster Tag
<a name="aws-properties-ecs-cluster-tag"></a>

The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

The following basic restrictions apply to tags:
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

## Syntax
<a name="aws-properties-ecs-cluster-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-cluster-tag-syntax.json"></a>

```
{
  "[Key](#cfn-ecs-cluster-tag-key)" : String,
  "[Value](#cfn-ecs-cluster-tag-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-cluster-tag-syntax.yaml"></a>

```
  [Key](#cfn-ecs-cluster-tag-key): String
  [Value](#cfn-ecs-cluster-tag-value): String
```

## Properties
<a name="aws-properties-ecs-cluster-tag-properties"></a>

`Key`  <a name="cfn-ecs-cluster-tag-key"></a>
One part of a key-value pair that make up a tag. A `key` is a general label that acts like a category for more specific tag values.  
*Required*: No  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ecs-cluster-tag-value"></a>
The optional part of a key-value pair that make up a tag. A `value` acts as a descriptor within a tag category (key).  
*Required*: No  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-cluster-tag--seealso"></a>
+  [Define an empty cluster with CloudWatch Container Insights enabled and defined tags](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#aws-resource-ecs-cluster--examples--Define_an_empty_cluster_with_CloudWatch_Container_Insights_enabled_and_defined_tags) 

# AWS::ECS::ClusterCapacityProviderAssociations
<a name="aws-resource-ecs-clustercapacityproviderassociations"></a>

The `AWS::ECS::ClusterCapacityProviderAssociations` resource associates one or more capacity providers and a default capacity provider strategy with a cluster.

## Syntax
<a name="aws-resource-ecs-clustercapacityproviderassociations-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ecs-clustercapacityproviderassociations-syntax.json"></a>

```
{
  "Type" : "AWS::ECS::ClusterCapacityProviderAssociations",
  "Properties" : {
      "[CapacityProviders](#cfn-ecs-clustercapacityproviderassociations-capacityproviders)" : [ String, ... ],
      "[Cluster](#cfn-ecs-clustercapacityproviderassociations-cluster)" : String,
      "[DefaultCapacityProviderStrategy](#cfn-ecs-clustercapacityproviderassociations-defaultcapacityproviderstrategy)" : [ CapacityProviderStrategy, ... ]
    }
}
```

### YAML
<a name="aws-resource-ecs-clustercapacityproviderassociations-syntax.yaml"></a>

```
Type: AWS::ECS::ClusterCapacityProviderAssociations
Properties:
  [CapacityProviders](#cfn-ecs-clustercapacityproviderassociations-capacityproviders): 
    - String
  [Cluster](#cfn-ecs-clustercapacityproviderassociations-cluster): String
  [DefaultCapacityProviderStrategy](#cfn-ecs-clustercapacityproviderassociations-defaultcapacityproviderstrategy): 
    - CapacityProviderStrategy
```

## Properties
<a name="aws-resource-ecs-clustercapacityproviderassociations-properties"></a>

`CapacityProviders`  <a name="cfn-ecs-clustercapacityproviderassociations-capacityproviders"></a>
The capacity providers to associate with the cluster.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Cluster`  <a name="cfn-ecs-clustercapacityproviderassociations-cluster"></a>
The cluster the capacity provider association is the target of.  
*Required*: Yes  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `2048`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DefaultCapacityProviderStrategy`  <a name="cfn-ecs-clustercapacityproviderassociations-defaultcapacityproviderstrategy"></a>
The default capacity provider strategy to associate with the cluster.  
*Required*: Yes  
*Type*: Array of [CapacityProviderStrategy](aws-properties-ecs-clustercapacityproviderassociations-capacityproviderstrategy.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-ecs-clustercapacityproviderassociations-return-values"></a>

### Ref
<a name="aws-resource-ecs-clustercapacityproviderassociations-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the cluster name.

# AWS::ECS::ClusterCapacityProviderAssociations CapacityProviderStrategy
<a name="aws-properties-ecs-clustercapacityproviderassociations-capacityproviderstrategy"></a>

The `CapacityProviderStrategy` property specifies the details of the default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.

## Syntax
<a name="aws-properties-ecs-clustercapacityproviderassociations-capacityproviderstrategy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-clustercapacityproviderassociations-capacityproviderstrategy-syntax.json"></a>

```
{
  "[Base](#cfn-ecs-clustercapacityproviderassociations-capacityproviderstrategy-base)" : Integer,
  "[CapacityProvider](#cfn-ecs-clustercapacityproviderassociations-capacityproviderstrategy-capacityprovider)" : String,
  "[Weight](#cfn-ecs-clustercapacityproviderassociations-capacityproviderstrategy-weight)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-clustercapacityproviderassociations-capacityproviderstrategy-syntax.yaml"></a>

```
  [Base](#cfn-ecs-clustercapacityproviderassociations-capacityproviderstrategy-base): Integer
  [CapacityProvider](#cfn-ecs-clustercapacityproviderassociations-capacityproviderstrategy-capacityprovider): String
  [Weight](#cfn-ecs-clustercapacityproviderassociations-capacityproviderstrategy-weight): Integer
```

## Properties
<a name="aws-properties-ecs-clustercapacityproviderassociations-capacityproviderstrategy-properties"></a>

`Base`  <a name="cfn-ecs-clustercapacityproviderassociations-capacityproviderstrategy-base"></a>
The *base* value designates how many tasks, at a minimum, to run on the specified capacity provider for each service. Only one capacity provider in a capacity provider strategy can have a *base* defined. If no value is specified, the default value of `0` is used.  
Base value characteristics:  
+ Only one capacity provider in a strategy can have a base defined
+ The default value is `0` if not specified
+ The valid range is 0 to 100,000
+ Base requirements are satisfied first before weight distribution
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `100000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CapacityProvider`  <a name="cfn-ecs-clustercapacityproviderassociations-capacityproviderstrategy-capacityprovider"></a>
The short name of the capacity provider. This can be either an AWS managed capacity provider (`FARGATE` or `FARGATE_SPOT`) or the name of a custom capacity provider that you created.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `FARGATE | FARGATE_SPOT`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Weight`  <a name="cfn-ecs-clustercapacityproviderassociations-capacityproviderstrategy-weight"></a>
The *weight* value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The `weight` value is taken into consideration after the `base` value, if defined, is satisfied.  
If no `weight` value is specified, the default value of `0` is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of `0` can't be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of `0`, any `RunTask` or `CreateService` actions using the capacity provider strategy will fail.  
Weight value characteristics:  
+ Weight is considered after the base value is satisfied
+ The default value is `0` if not specified
+ The valid range is 0 to 1,000
+ At least one capacity provider must have a weight greater than zero
+ Capacity providers with weight of `0` cannot place tasks
Task distribution logic:  

1. Base satisfaction: The minimum number of tasks specified by the base value are placed on that capacity provider

1. Weight distribution: After base requirements are met, additional tasks are distributed according to weight ratios
Examples:  
Equal Distribution: Two capacity providers both with weight `1` will split tasks evenly after base requirements are met.  
Weighted Distribution: If capacityProviderA has weight `1` and capacityProviderB has weight `4`, then for every 1 task on A, 4 tasks will run on B.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `1000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-clustercapacityproviderassociations-capacityproviderstrategy--seealso"></a>
+  [Creating a cluster capacity provider association using an Auto Scaling group capacity provider](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-clustercapacityproviderassociations.html#aws-resource-ecs-clustercapacityproviderassociations--examples--Creating_a_cluster_capacity_provider_association_using_an_Auto_Scaling_group_capacity_provider.) 

# AWS::ECS::Daemon
<a name="aws-resource-ecs-daemon"></a>

Information about a daemon resource.

## Syntax
<a name="aws-resource-ecs-daemon-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ecs-daemon-syntax.json"></a>

```
{
  "Type" : "AWS::ECS::Daemon",
  "Properties" : {
      "[CapacityProviderArns](#cfn-ecs-daemon-capacityproviderarns)" : [ String, ... ],
      "[ClusterArn](#cfn-ecs-daemon-clusterarn)" : String,
      "[DaemonName](#cfn-ecs-daemon-daemonname)" : String,
      "[DaemonTaskDefinitionArn](#cfn-ecs-daemon-daemontaskdefinitionarn)" : String,
      "[DeploymentConfiguration](#cfn-ecs-daemon-deploymentconfiguration)" : DaemonDeploymentConfiguration,
      "[EnableECSManagedTags](#cfn-ecs-daemon-enableecsmanagedtags)" : Boolean,
      "[EnableExecuteCommand](#cfn-ecs-daemon-enableexecutecommand)" : Boolean,
      "[PropagateTags](#cfn-ecs-daemon-propagatetags)" : String,
      "[Tags](#cfn-ecs-daemon-tags)" : [ Tag, ... ]
    }
}
```

### YAML
<a name="aws-resource-ecs-daemon-syntax.yaml"></a>

```
Type: AWS::ECS::Daemon
Properties:
  [CapacityProviderArns](#cfn-ecs-daemon-capacityproviderarns): 
    - String
  [ClusterArn](#cfn-ecs-daemon-clusterarn): String
  [DaemonName](#cfn-ecs-daemon-daemonname): String
  [DaemonTaskDefinitionArn](#cfn-ecs-daemon-daemontaskdefinitionarn): String
  [DeploymentConfiguration](#cfn-ecs-daemon-deploymentconfiguration): 
    DaemonDeploymentConfiguration
  [EnableECSManagedTags](#cfn-ecs-daemon-enableecsmanagedtags): Boolean
  [EnableExecuteCommand](#cfn-ecs-daemon-enableexecutecommand): Boolean
  [PropagateTags](#cfn-ecs-daemon-propagatetags): String
  [Tags](#cfn-ecs-daemon-tags): 
    - Tag
```

## Properties
<a name="aws-resource-ecs-daemon-properties"></a>

`CapacityProviderArns`  <a name="cfn-ecs-daemon-capacityproviderarns"></a>
The Amazon Resource Names (ARNs) of the capacity providers associated with the daemon.  
*Required*: No  
*Type*: Array of String  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ClusterArn`  <a name="cfn-ecs-daemon-clusterarn"></a>
The Amazon Resource Name (ARN) of the cluster that the daemon is running in.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DaemonName`  <a name="cfn-ecs-daemon-daemonname"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DaemonTaskDefinitionArn`  <a name="cfn-ecs-daemon-daemontaskdefinitionarn"></a>
The Amazon Resource Name (ARN) of the daemon task definition used by this revision.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeploymentConfiguration`  <a name="cfn-ecs-daemon-deploymentconfiguration"></a>
The deployment configuration used for this daemon deployment.  
*Required*: No  
*Type*: [DaemonDeploymentConfiguration](aws-properties-ecs-daemon-daemondeploymentconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableECSManagedTags`  <a name="cfn-ecs-daemon-enableecsmanagedtags"></a>
Specifies whether Amazon ECS managed tags are turned on for the daemon tasks.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableExecuteCommand`  <a name="cfn-ecs-daemon-enableexecutecommand"></a>
Specifies whether the execute command functionality is turned on for the daemon tasks.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PropagateTags`  <a name="cfn-ecs-daemon-propagatetags"></a>
Specifies whether tags are propagated from the daemon to the daemon tasks.  
*Required*: No  
*Type*: String  
*Allowed values*: `DAEMON | NONE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-ecs-daemon-tags"></a>
Property description not available.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-ecs-daemon-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-ecs-daemon-return-values"></a>

### Ref
<a name="aws-resource-ecs-daemon-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-ecs-daemon-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-ecs-daemon-return-values-fn--getatt-fn--getatt"></a>

`CreatedAt`  <a name="CreatedAt-fn::getatt"></a>
The Unix timestamp for the time when the daemon was created.

`DaemonArn`  <a name="DaemonArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the daemon.

`DaemonStatus`  <a name="DaemonStatus-fn::getatt"></a>
The status of the daemon.

`DeploymentArn`  <a name="DeploymentArn-fn::getatt"></a>
The Amazon Resource Name (ARN) of the most recent daemon deployment.

`UpdatedAt`  <a name="UpdatedAt-fn::getatt"></a>
The Unix timestamp for the time when the daemon was last updated.

# AWS::ECS::Daemon DaemonAlarmConfiguration
<a name="aws-properties-ecs-daemon-daemonalarmconfiguration"></a>

The CloudWatch alarm configuration for a daemon. When enabled, CloudWatch alarms determine whether a daemon deployment has failed.

## Syntax
<a name="aws-properties-ecs-daemon-daemonalarmconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemon-daemonalarmconfiguration-syntax.json"></a>

```
{
  "[AlarmNames](#cfn-ecs-daemon-daemonalarmconfiguration-alarmnames)" : [ String, ... ],
  "[Enable](#cfn-ecs-daemon-daemonalarmconfiguration-enable)" : Boolean
}
```

### YAML
<a name="aws-properties-ecs-daemon-daemonalarmconfiguration-syntax.yaml"></a>

```
  [AlarmNames](#cfn-ecs-daemon-daemonalarmconfiguration-alarmnames): 
    - String
  [Enable](#cfn-ecs-daemon-daemonalarmconfiguration-enable): Boolean
```

## Properties
<a name="aws-properties-ecs-daemon-daemonalarmconfiguration-properties"></a>

`AlarmNames`  <a name="cfn-ecs-daemon-daemonalarmconfiguration-alarmnames"></a>
The CloudWatch alarm names to monitor during a daemon deployment.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Enable`  <a name="cfn-ecs-daemon-daemonalarmconfiguration-enable"></a>
Determines whether to use the CloudWatch alarm option in the daemon deployment process. The default value is `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Daemon DaemonDeploymentConfiguration
<a name="aws-properties-ecs-daemon-daemondeploymentconfiguration"></a>

Optional deployment parameters that control how a daemon rolls out updates across container instances.

## Syntax
<a name="aws-properties-ecs-daemon-daemondeploymentconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemon-daemondeploymentconfiguration-syntax.json"></a>

```
{
  "[Alarms](#cfn-ecs-daemon-daemondeploymentconfiguration-alarms)" : DaemonAlarmConfiguration,
  "[BakeTimeInMinutes](#cfn-ecs-daemon-daemondeploymentconfiguration-baketimeinminutes)" : Integer,
  "[DrainPercent](#cfn-ecs-daemon-daemondeploymentconfiguration-drainpercent)" : Number
}
```

### YAML
<a name="aws-properties-ecs-daemon-daemondeploymentconfiguration-syntax.yaml"></a>

```
  [Alarms](#cfn-ecs-daemon-daemondeploymentconfiguration-alarms): 
    DaemonAlarmConfiguration
  [BakeTimeInMinutes](#cfn-ecs-daemon-daemondeploymentconfiguration-baketimeinminutes): Integer
  [DrainPercent](#cfn-ecs-daemon-daemondeploymentconfiguration-drainpercent): Number
```

## Properties
<a name="aws-properties-ecs-daemon-daemondeploymentconfiguration-properties"></a>

`Alarms`  <a name="cfn-ecs-daemon-daemondeploymentconfiguration-alarms"></a>
The CloudWatch alarm configuration for the daemon deployment. When alarms are triggered during a deployment, the deployment can be automatically rolled back.  
*Required*: No  
*Type*: [DaemonAlarmConfiguration](aws-properties-ecs-daemon-daemonalarmconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BakeTimeInMinutes`  <a name="cfn-ecs-daemon-daemondeploymentconfiguration-baketimeinminutes"></a>
The amount of time (in minutes) to wait after a successful deployment step before proceeding. This allows time to monitor for issues before continuing. The default value is 0.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `1440`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DrainPercent`  <a name="cfn-ecs-daemon-daemondeploymentconfiguration-drainpercent"></a>
The percentage of container instances to drain simultaneously during a daemon deployment. Valid values are between 0.0 and 100.0.  
*Required*: No  
*Type*: Number  
*Minimum*: `0`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Daemon Tag
<a name="aws-properties-ecs-daemon-tag"></a>

The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

The following basic restrictions apply to tags:
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

## Syntax
<a name="aws-properties-ecs-daemon-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemon-tag-syntax.json"></a>

```
{
  "[Key](#cfn-ecs-daemon-tag-key)" : String,
  "[Value](#cfn-ecs-daemon-tag-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemon-tag-syntax.yaml"></a>

```
  [Key](#cfn-ecs-daemon-tag-key): String
  [Value](#cfn-ecs-daemon-tag-value): String
```

## Properties
<a name="aws-properties-ecs-daemon-tag-properties"></a>

`Key`  <a name="cfn-ecs-daemon-tag-key"></a>
One part of a key-value pair that make up a tag. A `key` is a general label that acts like a category for more specific tag values.  
*Required*: Yes  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ecs-daemon-tag-value"></a>
The optional part of a key-value pair that make up a tag. A `value` acts as a descriptor within a tag category (key).  
*Required*: No  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::DaemonTaskDefinition
<a name="aws-resource-ecs-daemontaskdefinition"></a>

The details of a daemon task definition. A daemon task definition is a template that describes the containers that form a daemon. Daemons deploy cross-cutting software agents independently across your Amazon ECS infrastructure.

## Syntax
<a name="aws-resource-ecs-daemontaskdefinition-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ecs-daemontaskdefinition-syntax.json"></a>

```
{
  "Type" : "AWS::ECS::DaemonTaskDefinition",
  "Properties" : {
      "[ContainerDefinitions](#cfn-ecs-daemontaskdefinition-containerdefinitions)" : [ DaemonContainerDefinition, ... ],
      "[Cpu](#cfn-ecs-daemontaskdefinition-cpu)" : String,
      "[ExecutionRoleArn](#cfn-ecs-daemontaskdefinition-executionrolearn)" : String,
      "[Family](#cfn-ecs-daemontaskdefinition-family)" : String,
      "[Memory](#cfn-ecs-daemontaskdefinition-memory)" : String,
      "[Tags](#cfn-ecs-daemontaskdefinition-tags)" : [ Tag, ... ],
      "[TaskRoleArn](#cfn-ecs-daemontaskdefinition-taskrolearn)" : String,
      "[Volumes](#cfn-ecs-daemontaskdefinition-volumes)" : [ Volume, ... ]
    }
}
```

### YAML
<a name="aws-resource-ecs-daemontaskdefinition-syntax.yaml"></a>

```
Type: AWS::ECS::DaemonTaskDefinition
Properties:
  [ContainerDefinitions](#cfn-ecs-daemontaskdefinition-containerdefinitions): 
    - DaemonContainerDefinition
  [Cpu](#cfn-ecs-daemontaskdefinition-cpu): String
  [ExecutionRoleArn](#cfn-ecs-daemontaskdefinition-executionrolearn): String
  [Family](#cfn-ecs-daemontaskdefinition-family): String
  [Memory](#cfn-ecs-daemontaskdefinition-memory): String
  [Tags](#cfn-ecs-daemontaskdefinition-tags): 
    - Tag
  [TaskRoleArn](#cfn-ecs-daemontaskdefinition-taskrolearn): String
  [Volumes](#cfn-ecs-daemontaskdefinition-volumes): 
    - Volume
```

## Properties
<a name="aws-resource-ecs-daemontaskdefinition-properties"></a>

`ContainerDefinitions`  <a name="cfn-ecs-daemontaskdefinition-containerdefinitions"></a>
A list of container definitions in JSON format that describe the containers that make up the daemon task.  
*Required*: No  
*Type*: Array of [DaemonContainerDefinition](aws-properties-ecs-daemontaskdefinition-daemoncontainerdefinition.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Cpu`  <a name="cfn-ecs-daemontaskdefinition-cpu"></a>
The number of CPU units used by the daemon task.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ExecutionRoleArn`  <a name="cfn-ecs-daemontaskdefinition-executionrolearn"></a>
The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make Amazon Web Services API calls on your behalf.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Family`  <a name="cfn-ecs-daemontaskdefinition-family"></a>
The name of a family that this daemon task definition is registered to.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Memory`  <a name="cfn-ecs-daemontaskdefinition-memory"></a>
The amount of memory (in MiB) used by the daemon task.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-ecs-daemontaskdefinition-tags"></a>
Property description not available.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-ecs-daemontaskdefinition-tag.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TaskRoleArn`  <a name="cfn-ecs-daemontaskdefinition-taskrolearn"></a>
The short name or full Amazon Resource Name (ARN) of the IAM role that grants containers in the daemon task permission to call Amazon Web Services APIs on your behalf.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Volumes`  <a name="cfn-ecs-daemontaskdefinition-volumes"></a>
The list of data volume definitions for the daemon task.  
*Required*: No  
*Type*: Array of [Volume](aws-properties-ecs-daemontaskdefinition-volume.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-ecs-daemontaskdefinition-return-values"></a>

### Ref
<a name="aws-resource-ecs-daemontaskdefinition-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-ecs-daemontaskdefinition-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-ecs-daemontaskdefinition-return-values-fn--getatt-fn--getatt"></a>

`DaemonTaskDefinitionArn`  <a name="DaemonTaskDefinitionArn-fn::getatt"></a>
The full Amazon Resource Name (ARN) of the daemon task definition.

# AWS::ECS::DaemonTaskDefinition ContainerDependency
<a name="aws-properties-ecs-daemontaskdefinition-containerdependency"></a>

The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed.

Your Amazon ECS container instances require at least version 1.26.0 of the container agent to use container dependencies. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) in the *Amazon Elastic Container Service Developer Guide*. If you're using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the `ecs-init` package. If your container instances are launched from version `20190301` or later, then they contain the required versions of the container agent and `ecs-init`. For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide*.

**Note**  
For tasks that use the Fargate launch type, the task or service requires the following platforms:  
Linux platform version `1.3.0` or later.
Windows platform version `1.0.0` or later.

For more information about how to create a container dependency, see [Container dependency](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/example_task_definitions.html#example_task_definition-containerdependency) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-containerdependency-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-containerdependency-syntax.json"></a>

```
{
  "[Condition](#cfn-ecs-daemontaskdefinition-containerdependency-condition)" : String,
  "[ContainerName](#cfn-ecs-daemontaskdefinition-containerdependency-containername)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-containerdependency-syntax.yaml"></a>

```
  [Condition](#cfn-ecs-daemontaskdefinition-containerdependency-condition): String
  [ContainerName](#cfn-ecs-daemontaskdefinition-containerdependency-containername): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-containerdependency-properties"></a>

`Condition`  <a name="cfn-ecs-daemontaskdefinition-containerdependency-condition"></a>
The dependency condition of the container. The following are the available conditions and their behavior:  
+ `START` - This condition emulates the behavior of links and volumes today. It validates that a dependent container is started before permitting other containers to start.
+ `COMPLETE` - This condition validates that a dependent container runs to completion (exits) before permitting other containers to start. This can be useful for nonessential containers that run a script and then exit. This condition can't be set on an essential container.
+ `SUCCESS` - This condition is the same as `COMPLETE`, but it also requires that the container exits with a `zero` status. This condition can't be set on an essential container.
+ `HEALTHY` - This condition validates that the dependent container passes its Docker health check before permitting other containers to start. This requires that the dependent container has health checks configured. This condition is confirmed only at task startup.
*Required*: No  
*Type*: String  
*Allowed values*: `START | COMPLETE | SUCCESS | HEALTHY`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ContainerName`  <a name="cfn-ecs-daemontaskdefinition-containerdependency-containername"></a>
The name of a container.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition DaemonContainerDefinition
<a name="aws-properties-ecs-daemontaskdefinition-daemoncontainerdefinition"></a>

A container definition for a daemon task. Daemon container definitions describe the containers that run as part of a daemon task on container instances managed by capacity providers.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-daemoncontainerdefinition-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-daemoncontainerdefinition-syntax.json"></a>

```
{
  "[Command](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-command)" : [ String, ... ],
  "[Cpu](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-cpu)" : Integer,
  "[DependsOn](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-dependson)" : [ ContainerDependency, ... ],
  "[EntryPoint](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-entrypoint)" : [ String, ... ],
  "[Environment](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-environment)" : [ KeyValuePair, ... ],
  "[EnvironmentFiles](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-environmentfiles)" : [ EnvironmentFile, ... ],
  "[Essential](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-essential)" : Boolean,
  "[FirelensConfiguration](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-firelensconfiguration)" : FirelensConfiguration,
  "[HealthCheck](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-healthcheck)" : HealthCheck,
  "[Image](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-image)" : String,
  "[Interactive](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-interactive)" : Boolean,
  "[LinuxParameters](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-linuxparameters)" : LinuxParameters,
  "[LogConfiguration](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-logconfiguration)" : LogConfiguration,
  "[Memory](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-memory)" : Integer,
  "[MemoryReservation](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-memoryreservation)" : Integer,
  "[MountPoints](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-mountpoints)" : [ MountPoint, ... ],
  "[Name](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-name)" : String,
  "[Privileged](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-privileged)" : Boolean,
  "[PseudoTerminal](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-pseudoterminal)" : Boolean,
  "[ReadonlyRootFilesystem](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-readonlyrootfilesystem)" : Boolean,
  "[RepositoryCredentials](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-repositorycredentials)" : RepositoryCredentials,
  "[RestartPolicy](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-restartpolicy)" : RestartPolicy,
  "[Secrets](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-secrets)" : [ Secret, ... ],
  "[StartTimeout](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-starttimeout)" : Integer,
  "[StopTimeout](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-stoptimeout)" : Integer,
  "[SystemControls](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-systemcontrols)" : [ SystemControl, ... ],
  "[Ulimits](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-ulimits)" : [ Ulimit, ... ],
  "[User](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-user)" : String,
  "[WorkingDirectory](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-workingdirectory)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-daemoncontainerdefinition-syntax.yaml"></a>

```
  [Command](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-command): 
    - String
  [Cpu](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-cpu): Integer
  [DependsOn](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-dependson): 
    - ContainerDependency
  [EntryPoint](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-entrypoint): 
    - String
  [Environment](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-environment): 
    - KeyValuePair
  [EnvironmentFiles](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-environmentfiles): 
    - EnvironmentFile
  [Essential](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-essential): Boolean
  [FirelensConfiguration](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-firelensconfiguration): 
    FirelensConfiguration
  [HealthCheck](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-healthcheck): 
    HealthCheck
  [Image](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-image): String
  [Interactive](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-interactive): Boolean
  [LinuxParameters](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-linuxparameters): 
    LinuxParameters
  [LogConfiguration](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-logconfiguration): 
    LogConfiguration
  [Memory](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-memory): Integer
  [MemoryReservation](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-memoryreservation): Integer
  [MountPoints](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-mountpoints): 
    - MountPoint
  [Name](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-name): String
  [Privileged](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-privileged): Boolean
  [PseudoTerminal](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-pseudoterminal): Boolean
  [ReadonlyRootFilesystem](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-readonlyrootfilesystem): Boolean
  [RepositoryCredentials](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-repositorycredentials): 
    RepositoryCredentials
  [RestartPolicy](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-restartpolicy): 
    RestartPolicy
  [Secrets](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-secrets): 
    - Secret
  [StartTimeout](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-starttimeout): Integer
  [StopTimeout](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-stoptimeout): Integer
  [SystemControls](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-systemcontrols): 
    - SystemControl
  [Ulimits](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-ulimits): 
    - Ulimit
  [User](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-user): String
  [WorkingDirectory](#cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-workingdirectory): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-daemoncontainerdefinition-properties"></a>

`Command`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-command"></a>
The command that's passed to the container.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Cpu`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-cpu"></a>
The number of `cpu` units reserved for the container.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DependsOn`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-dependson"></a>
The dependencies defined for container startup and shutdown. A container can contain multiple dependencies on other containers in a task definition.  
*Required*: No  
*Type*: Array of [ContainerDependency](aws-properties-ecs-daemontaskdefinition-containerdependency.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EntryPoint`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-entrypoint"></a>
The entry point that's passed to the container.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Environment`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-environment"></a>
The environment variables to pass to a container.  
*Required*: No  
*Type*: Array of [KeyValuePair](aws-properties-ecs-daemontaskdefinition-keyvaluepair.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EnvironmentFiles`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-environmentfiles"></a>
A list of files containing the environment variables to pass to a container.  
*Required*: No  
*Type*: Array of [EnvironmentFile](aws-properties-ecs-daemontaskdefinition-environmentfile.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Essential`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-essential"></a>
If the `essential` parameter of a container is marked as `true`, and that container fails or stops for any reason, all other containers that are part of the task are stopped.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FirelensConfiguration`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-firelensconfiguration"></a>
The FireLens configuration for the container. This is used to specify and configure a log router for container logs.  
*Required*: No  
*Type*: [FirelensConfiguration](aws-properties-ecs-daemontaskdefinition-firelensconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`HealthCheck`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-healthcheck"></a>
The container health check command and associated configuration parameters for the container.  
*Required*: No  
*Type*: [HealthCheck](aws-properties-ecs-daemontaskdefinition-healthcheck.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Image`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-image"></a>
The image used to start the container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with either `repository-url/image:tag` or `repository-url/image@digest`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Interactive`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-interactive"></a>
When this parameter is `true`, you can deploy containerized applications that require `stdin` or a `tty` to be allocated.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LinuxParameters`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-linuxparameters"></a>
Linux-specific modifications that are applied to the container configuration, such as Linux kernel capabilities.  
*Required*: No  
*Type*: [LinuxParameters](aws-properties-ecs-daemontaskdefinition-linuxparameters.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LogConfiguration`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-logconfiguration"></a>
The log configuration specification for the container.  
*Required*: No  
*Type*: [LogConfiguration](aws-properties-ecs-daemontaskdefinition-logconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Memory`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-memory"></a>
The amount (in MiB) of memory to present to the container. If the container attempts to exceed the memory specified here, the container is killed.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MemoryReservation`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-memoryreservation"></a>
The soft limit (in MiB) of memory to reserve for the container.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MountPoints`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-mountpoints"></a>
The mount points for data volumes in your container.  
*Required*: No  
*Type*: Array of [MountPoint](aws-properties-ecs-daemontaskdefinition-mountpoint.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-name"></a>
The name of the container. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Privileged`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-privileged"></a>
When this parameter is true, the container is given elevated privileges on the host container instance (similar to the `root` user).  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PseudoTerminal`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-pseudoterminal"></a>
When this parameter is `true`, a TTY is allocated.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ReadonlyRootFilesystem`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-readonlyrootfilesystem"></a>
When this parameter is true, the container is given read-only access to its root file system.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RepositoryCredentials`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-repositorycredentials"></a>
The private repository authentication credentials to use.  
*Required*: No  
*Type*: [RepositoryCredentials](aws-properties-ecs-daemontaskdefinition-repositorycredentials.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestartPolicy`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-restartpolicy"></a>
The restart policy for the container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task.  
*Required*: No  
*Type*: [RestartPolicy](aws-properties-ecs-daemontaskdefinition-restartpolicy.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Secrets`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-secrets"></a>
The secrets to pass to the container.  
*Required*: No  
*Type*: Array of [Secret](aws-properties-ecs-daemontaskdefinition-secret.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StartTimeout`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-starttimeout"></a>
Time duration (in seconds) to wait before giving up on resolving dependencies for a container.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StopTimeout`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-stoptimeout"></a>
Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SystemControls`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-systemcontrols"></a>
A list of namespaced kernel parameters to set in the container.  
*Required*: No  
*Type*: Array of [SystemControl](aws-properties-ecs-daemontaskdefinition-systemcontrol.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Ulimits`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-ulimits"></a>
A list of `ulimits` to set in the container.  
*Required*: No  
*Type*: Array of [Ulimit](aws-properties-ecs-daemontaskdefinition-ulimit.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`User`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-user"></a>
The user to use inside the container.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`WorkingDirectory`  <a name="cfn-ecs-daemontaskdefinition-daemoncontainerdefinition-workingdirectory"></a>
The working directory to run commands inside the container in.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition Device
<a name="aws-properties-ecs-daemontaskdefinition-device"></a>

An object representing a container instance host device.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-device-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-device-syntax.json"></a>

```
{
  "[ContainerPath](#cfn-ecs-daemontaskdefinition-device-containerpath)" : String,
  "[HostPath](#cfn-ecs-daemontaskdefinition-device-hostpath)" : String,
  "[Permissions](#cfn-ecs-daemontaskdefinition-device-permissions)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-device-syntax.yaml"></a>

```
  [ContainerPath](#cfn-ecs-daemontaskdefinition-device-containerpath): String
  [HostPath](#cfn-ecs-daemontaskdefinition-device-hostpath): String
  [Permissions](#cfn-ecs-daemontaskdefinition-device-permissions): 
    - String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-device-properties"></a>

`ContainerPath`  <a name="cfn-ecs-daemontaskdefinition-device-containerpath"></a>
The path inside the container at which to expose the host device.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`HostPath`  <a name="cfn-ecs-daemontaskdefinition-device-hostpath"></a>
The path for the device on the host container instance.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Permissions`  <a name="cfn-ecs-daemontaskdefinition-device-permissions"></a>
The explicit permissions to provide to the container for the device. By default, the container has permissions for `read`, `write`, and `mknod` for the device.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition EnvironmentFile
<a name="aws-properties-ecs-daemontaskdefinition-environmentfile"></a>

A list of files containing the environment variables to pass to a container. You can specify up to ten environment files. The file must have a `.env` file extension. Each line in an environment file should contain an environment variable in `VARIABLE=VALUE` format. Lines beginning with `#` are treated as comments and are ignored.

If there are environment variables specified using the `environment` parameter in a container definition, they take precedence over the variables contained within an environment file. If multiple environment files are specified that contain the same variable, they're processed from the top down. We recommend that you use unique variable names. For more information, see [Use a file to pass environment variables to a container](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/use-environment-file.html) in the *Amazon Elastic Container Service Developer Guide*.

Environment variable files are objects in Amazon S3 and all Amazon S3 security considerations apply. 

You must use the following platforms for the Fargate launch type:
+ Linux platform version `1.4.0` or later.
+ Windows platform version `1.0.0` or later.

Consider the following when using the Fargate launch type:
+ The file is handled like a native Docker env-file.
+ There is no support for shell escape handling.
+ The container entry point interperts the `VARIABLE` values.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-environmentfile-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-environmentfile-syntax.json"></a>

```
{
  "[Type](#cfn-ecs-daemontaskdefinition-environmentfile-type)" : String,
  "[Value](#cfn-ecs-daemontaskdefinition-environmentfile-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-environmentfile-syntax.yaml"></a>

```
  [Type](#cfn-ecs-daemontaskdefinition-environmentfile-type): String
  [Value](#cfn-ecs-daemontaskdefinition-environmentfile-value): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-environmentfile-properties"></a>

`Type`  <a name="cfn-ecs-daemontaskdefinition-environmentfile-type"></a>
The file type to use. Environment files are objects in Amazon S3. The only supported value is `s3`.  
*Required*: No  
*Type*: String  
*Allowed values*: `s3`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-ecs-daemontaskdefinition-environmentfile-value"></a>
The Amazon Resource Name (ARN) of the Amazon S3 object containing the environment variable file.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition FirelensConfiguration
<a name="aws-properties-ecs-daemontaskdefinition-firelensconfiguration"></a>

The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see [Custom log routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-firelensconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-firelensconfiguration-syntax.json"></a>

```
{
  "[Options](#cfn-ecs-daemontaskdefinition-firelensconfiguration-options)" : {Key: Value, ...},
  "[Type](#cfn-ecs-daemontaskdefinition-firelensconfiguration-type)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-firelensconfiguration-syntax.yaml"></a>

```
  [Options](#cfn-ecs-daemontaskdefinition-firelensconfiguration-options): 
    Key: Value
  [Type](#cfn-ecs-daemontaskdefinition-firelensconfiguration-type): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-firelensconfiguration-properties"></a>

`Options`  <a name="cfn-ecs-daemontaskdefinition-firelensconfiguration-options"></a>
The options to use when configuring the log router. This field is optional and can be used to specify a custom configuration file or to add additional metadata, such as the task, task definition, cluster, and container instance details to the log event. If specified, the syntax to use is `"options":{"enable-ecs-log-metadata":"true|false","config-file-type:"s3|file","config-file-value":"arn:aws:s3:::mybucket/fluent.conf|filepath"}`. For more information, see [Creating a task definition that uses a FireLens configuration](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html#firelens-taskdef) in the *Amazon Elastic Container Service Developer Guide*.  
Tasks hosted on AWS Fargate only support the `file` configuration file type.
*Required*: No  
*Type*: Object of String  
*Pattern*: `.{1,}`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Type`  <a name="cfn-ecs-daemontaskdefinition-firelensconfiguration-type"></a>
The log router to use. The valid values are `fluentd` or `fluentbit`.  
*Required*: No  
*Type*: String  
*Allowed values*: `fluentd | fluentbit`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition HealthCheck
<a name="aws-properties-ecs-daemontaskdefinition-healthcheck"></a>

An object representing a container health check. Health check parameters that are specified in a container definition override any Docker health checks that exist in the container image (such as those specified in a parent image or from the image's Dockerfile). This configuration maps to the `HEALTHCHECK` parameter of docker run.

**Note**  
The Amazon ECS container agent only monitors and reports on the health checks specified in the task definition. Amazon ECS does not monitor Docker health checks that are embedded in a container image and not specified in the container definition. Health check parameters that are specified in a container definition override any Docker health checks that exist in the container image.

You can view the health status of both individual containers and a task with the DescribeTasks API operation or when viewing the task details in the console.

The health check is designed to make sure that your containers survive agent restarts, upgrades, or temporary unavailability.

Amazon ECS performs health checks on containers with the default that launched the container instance or the task.

The following describes the possible `healthStatus` values for a container:
+ `HEALTHY`-The container health check has passed successfully.
+ `UNHEALTHY`-The container health check has failed.
+ `UNKNOWN`-The container health check is being evaluated, there's no container health check defined, or Amazon ECS doesn't have the health status of the container.

The following describes the possible `healthStatus` values based on the container health checker status of essential containers in the task with the following priority order (high to low):
+ `UNHEALTHY`-One or more essential containers have failed their health check.
+ `UNKNOWN`-Any essential container running within the task is in an `UNKNOWN` state and no other essential containers have an `UNHEALTHY` state.
+ `HEALTHY`-All essential containers within the task have passed their health checks.

Consider the following task health example with 2 containers.
+ If Container1 is `UNHEALTHY` and Container2 is `UNKNOWN`, the task health is `UNHEALTHY`.
+ If Container1 is `UNHEALTHY` and Container2 is `HEALTHY`, the task health is `UNHEALTHY`.
+ If Container1 is `HEALTHY` and Container2 is `UNKNOWN`, the task health is `UNKNOWN`.
+ If Container1 is `HEALTHY` and Container2 is `HEALTHY`, the task health is `HEALTHY`.

Consider the following task health example with 3 containers.
+ If Container1 is `UNHEALTHY` and Container2 is `UNKNOWN`, and Container3 is `UNKNOWN`, the task health is `UNHEALTHY`.
+ If Container1 is `UNHEALTHY` and Container2 is `UNKNOWN`, and Container3 is `HEALTHY`, the task health is `UNHEALTHY`.
+ If Container1 is `UNHEALTHY` and Container2 is `HEALTHY`, and Container3 is `HEALTHY`, the task health is `UNHEALTHY`.
+ If Container1 is `HEALTHY` and Container2 is `UNKNOWN`, and Container3 is `HEALTHY`, the task health is `UNKNOWN`.
+ If Container1 is `HEALTHY` and Container2 is `UNKNOWN`, and Container3 is `UNKNOWN`, the task health is `UNKNOWN`.
+ If Container1 is `HEALTHY` and Container2 is `HEALTHY`, and Container3 is `HEALTHY`, the task health is `HEALTHY`.

If a task is run manually, and not as part of a service, the task will continue its lifecycle regardless of its health status. For tasks that are part of a service, if the task reports as unhealthy then the task will be stopped and the service scheduler will replace it.

When a container health check fails for a task that is part of a service, the following process occurs:

1. The task is marked as `UNHEALTHY`.

1. The unhealthy task will be stopped, and during the stopping process, it will go through the following states:
   + `DEACTIVATING` - In this state, Amazon ECS performs additional steps before stopping the task. For example, for tasks that are part of services configured to use Elastic Load Balancing target groups, target groups will be deregistered in this state.
   + `STOPPING` - The task is in the process of being stopped.
   + `DEPROVISIONING` - Resources associated with the task are being cleaned up.
   + `STOPPED` - The task has been completely stopped.

1. After the old task stops, a new task will be launched to ensure service operation, and the new task will go through the following lifecycle:
   + `PROVISIONING` - Resources required for the task are being provisioned.
   + `PENDING` - The task is waiting to be placed on a container instance.
   + `ACTIVATING` - In this state, Amazon ECS pulls container images, creates containers, configures task networking, registers load balancer target groups, and configures service discovery status.
   + `RUNNING` - The task is running and performing its work.

For more detailed information about task lifecycle states, see [Task lifecycle](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-lifecycle-explanation.html) in the *Amazon Elastic Container Service Developer Guide*.

The following are notes about container health check support:
+ If the Amazon ECS container agent becomes disconnected from the Amazon ECS service, this won't cause a container to transition to an `UNHEALTHY` status. This is by design, to ensure that containers remain running during agent restarts or temporary unavailability. The health check status is the "last heard from" response from the Amazon ECS agent, so if the container was considered `HEALTHY` prior to the disconnect, that status will remain until the agent reconnects and another health check occurs. There are no assumptions made about the status of the container health checks.
+ Container health checks require version `1.17.0` or greater of the Amazon ECS container agent. For more information, see [Updating the Amazon ECS container agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html).
+ Container health checks are supported for Fargate tasks if you're using platform version `1.1.0` or greater. For more information, see [AWS Fargate platform versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
+ Container health checks aren't supported for tasks that are part of a service that's configured to use a Classic Load Balancer.

For an example of how to specify a task definition with multiple containers where container dependency is specified, see [Container dependency](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/example_task_definitions.html#example_task_definition-containerdependency) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-healthcheck-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-healthcheck-syntax.json"></a>

```
{
  "[Command](#cfn-ecs-daemontaskdefinition-healthcheck-command)" : [ String, ... ],
  "[Interval](#cfn-ecs-daemontaskdefinition-healthcheck-interval)" : Integer,
  "[Retries](#cfn-ecs-daemontaskdefinition-healthcheck-retries)" : Integer,
  "[StartPeriod](#cfn-ecs-daemontaskdefinition-healthcheck-startperiod)" : Integer,
  "[Timeout](#cfn-ecs-daemontaskdefinition-healthcheck-timeout)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-healthcheck-syntax.yaml"></a>

```
  [Command](#cfn-ecs-daemontaskdefinition-healthcheck-command): 
    - String
  [Interval](#cfn-ecs-daemontaskdefinition-healthcheck-interval): Integer
  [Retries](#cfn-ecs-daemontaskdefinition-healthcheck-retries): Integer
  [StartPeriod](#cfn-ecs-daemontaskdefinition-healthcheck-startperiod): Integer
  [Timeout](#cfn-ecs-daemontaskdefinition-healthcheck-timeout): Integer
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-healthcheck-properties"></a>

`Command`  <a name="cfn-ecs-daemontaskdefinition-healthcheck-command"></a>
A string array representing the command that the container runs to determine if it is healthy. The string array must start with `CMD` to run the command arguments directly, or `CMD-SHELL` to run the command with the container's default shell.   
 When you use the AWS Management Console JSON panel, the AWS Command Line Interface, or the APIs, enclose the list of commands in double quotes and brackets.  
 `[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]`   
You don't include the double quotes and brackets when you use the AWS Management Console.  
 ` CMD-SHELL, curl -f http://localhost/ || exit 1`   
An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see `HealthCheck` in the docker container create command.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Interval`  <a name="cfn-ecs-daemontaskdefinition-healthcheck-interval"></a>
The time period in seconds between each health check execution. You may specify between 5 and 300 seconds. The default value is 30 seconds. This value applies only when you specify a `command`.   
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Retries`  <a name="cfn-ecs-daemontaskdefinition-healthcheck-retries"></a>
The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is 3. This value applies only when you specify a `command`.   
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StartPeriod`  <a name="cfn-ecs-daemontaskdefinition-healthcheck-startperiod"></a>
The optional grace period to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. You can specify between 0 and 300 seconds. By default, the `startPeriod` is off. This value applies only when you specify a `command`.   
If a health check succeeds within the `startPeriod`, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Timeout`  <a name="cfn-ecs-daemontaskdefinition-healthcheck-timeout"></a>
The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5. This value applies only when you specify a `command`.   
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition HostVolumeProperties
<a name="aws-properties-ecs-daemontaskdefinition-hostvolumeproperties"></a>

Details on a container instance bind mount host volume.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-hostvolumeproperties-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-hostvolumeproperties-syntax.json"></a>

```
{
  "[SourcePath](#cfn-ecs-daemontaskdefinition-hostvolumeproperties-sourcepath)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-hostvolumeproperties-syntax.yaml"></a>

```
  [SourcePath](#cfn-ecs-daemontaskdefinition-hostvolumeproperties-sourcepath): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-hostvolumeproperties-properties"></a>

`SourcePath`  <a name="cfn-ecs-daemontaskdefinition-hostvolumeproperties-sourcepath"></a>
When the `host` parameter is used, specify a `sourcePath` to declare the path on the host container instance that's presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If the `host` parameter contains a `sourcePath` file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the `sourcePath` value doesn't exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.  
If you're using the Fargate launch type, the `sourcePath` parameter is not supported.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition KernelCapabilities
<a name="aws-properties-ecs-daemontaskdefinition-kernelcapabilities"></a>

The Linux capabilities to add or remove from the default Docker configuration for a container defined in the task definition. For more detailed information about these Linux capabilities, see the [capabilities(7)](http://man7.org/linux/man-pages/man7/capabilities.7.html) Linux manual page.

The following describes how Docker processes the Linux capabilities specified in the `add` and `drop` request parameters. For information about the latest behavior, see [Docker Compose: order of cap\$1drop and cap\$1add](https://forums.docker.com/t/docker-compose-order-of-cap-drop-and-cap-add/97136/1) in the Docker Community Forum.
+ When the container is a privleged container, the container capabilities are all of the default Docker capabilities. The capabilities specified in the `add` request parameter, and the `drop` request parameter are ignored.
+ When the `add` request parameter is set to ALL, the container capabilities are all of the default Docker capabilities, excluding those specified in the `drop` request parameter.
+ When the `drop` request parameter is set to ALL, the container capabilities are the capabilities specified in the `add` request parameter.
+ When the `add` request parameter and the `drop` request parameter are both empty, the capabilities the container capabilities are all of the default Docker capabilities.
+ The default is to first drop the capabilities specified in the `drop` request parameter, and then add the capabilities specified in the `add` request parameter.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-kernelcapabilities-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-kernelcapabilities-syntax.json"></a>

```
{
  "[Add](#cfn-ecs-daemontaskdefinition-kernelcapabilities-add)" : [ String, ... ],
  "[Drop](#cfn-ecs-daemontaskdefinition-kernelcapabilities-drop)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-kernelcapabilities-syntax.yaml"></a>

```
  [Add](#cfn-ecs-daemontaskdefinition-kernelcapabilities-add): 
    - String
  [Drop](#cfn-ecs-daemontaskdefinition-kernelcapabilities-drop): 
    - String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-kernelcapabilities-properties"></a>

`Add`  <a name="cfn-ecs-daemontaskdefinition-kernelcapabilities-add"></a>
The Linux capabilities for the container that have been added to the default configuration provided by Docker. This parameter maps to `CapAdd` in the docker container create command and the `--cap-add` option to docker run.  
Tasks launched on AWS Fargate only support adding the `SYS_PTRACE` kernel capability.
Valid values: `"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | "WAKE_ALARM"`  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Drop`  <a name="cfn-ecs-daemontaskdefinition-kernelcapabilities-drop"></a>
The Linux capabilities for the container that have been removed from the default configuration provided by Docker. This parameter maps to `CapDrop` in the docker container create command and the `--cap-drop` option to docker run.  
Valid values: `"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | "WAKE_ALARM"`  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition KeyValuePair
<a name="aws-properties-ecs-daemontaskdefinition-keyvaluepair"></a>

A key-value pair object.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-keyvaluepair-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-keyvaluepair-syntax.json"></a>

```
{
  "[Name](#cfn-ecs-daemontaskdefinition-keyvaluepair-name)" : String,
  "[Value](#cfn-ecs-daemontaskdefinition-keyvaluepair-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-keyvaluepair-syntax.yaml"></a>

```
  [Name](#cfn-ecs-daemontaskdefinition-keyvaluepair-name): String
  [Value](#cfn-ecs-daemontaskdefinition-keyvaluepair-value): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-keyvaluepair-properties"></a>

`Name`  <a name="cfn-ecs-daemontaskdefinition-keyvaluepair-name"></a>
The name of the key-value pair. For environment variables, this is the name of the environment variable.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-ecs-daemontaskdefinition-keyvaluepair-value"></a>
The value of the key-value pair. For environment variables, this is the value of the environment variable.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition LinuxParameters
<a name="aws-properties-ecs-daemontaskdefinition-linuxparameters"></a>

The Linux-specific options that are applied to the container, such as Linux [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html).

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-linuxparameters-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-linuxparameters-syntax.json"></a>

```
{
  "[Capabilities](#cfn-ecs-daemontaskdefinition-linuxparameters-capabilities)" : KernelCapabilities,
  "[Devices](#cfn-ecs-daemontaskdefinition-linuxparameters-devices)" : [ Device, ... ],
  "[InitProcessEnabled](#cfn-ecs-daemontaskdefinition-linuxparameters-initprocessenabled)" : Boolean,
  "[Tmpfs](#cfn-ecs-daemontaskdefinition-linuxparameters-tmpfs)" : [ Tmpfs, ... ]
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-linuxparameters-syntax.yaml"></a>

```
  [Capabilities](#cfn-ecs-daemontaskdefinition-linuxparameters-capabilities): 
    KernelCapabilities
  [Devices](#cfn-ecs-daemontaskdefinition-linuxparameters-devices): 
    - Device
  [InitProcessEnabled](#cfn-ecs-daemontaskdefinition-linuxparameters-initprocessenabled): Boolean
  [Tmpfs](#cfn-ecs-daemontaskdefinition-linuxparameters-tmpfs): 
    - Tmpfs
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-linuxparameters-properties"></a>

`Capabilities`  <a name="cfn-ecs-daemontaskdefinition-linuxparameters-capabilities"></a>
The Linux capabilities for the container that are added to or dropped from the default configuration provided by Docker.  
For tasks that use the Fargate launch type, `capabilities` is supported for all platform versions but the `add` parameter is only supported if using platform version 1.4.0 or later.
*Required*: No  
*Type*: [KernelCapabilities](aws-properties-ecs-daemontaskdefinition-kernelcapabilities.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Devices`  <a name="cfn-ecs-daemontaskdefinition-linuxparameters-devices"></a>
Any host devices to expose to the container. This parameter maps to `Devices` in the docker container create command and the `--device` option to docker run.  
If you're using tasks that use the Fargate launch type, the `devices` parameter isn't supported.
*Required*: No  
*Type*: Array of [Device](aws-properties-ecs-daemontaskdefinition-device.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`InitProcessEnabled`  <a name="cfn-ecs-daemontaskdefinition-linuxparameters-initprocessenabled"></a>
Run an `init` process inside the container that forwards signals and reaps processes. This parameter maps to the `--init` option to docker run. This parameter requires version 1.25 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tmpfs`  <a name="cfn-ecs-daemontaskdefinition-linuxparameters-tmpfs"></a>
The container path, mount options, and size (in MiB) of the tmpfs mount. This parameter maps to the `--tmpfs` option to docker run.  
If you're using tasks that use the Fargate launch type, the `tmpfs` parameter isn't supported.
*Required*: No  
*Type*: [Array](aws-properties-ecs-daemontaskdefinition-tmpfs.md) of [Tmpfs](aws-properties-ecs-daemontaskdefinition-tmpfs.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition LogConfiguration
<a name="aws-properties-ecs-daemontaskdefinition-logconfiguration"></a>

The log configuration for the container. This parameter maps to `LogConfig` in the docker container create command and the `--log-driver` option to docker run.

By default, containers use the same logging driver that the Docker daemon uses. However, the container might use a different logging driver than the Docker daemon by specifying a log driver configuration in the container definition.

Understand the following when specifying a log configuration for your containers.
+ Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon. Additional log drivers may be available in future releases of the Amazon ECS container agent.

  For tasks on AWS Fargate, the supported log drivers are `awslogs`, `splunk`, and `awsfirelens`.

  For tasks hosted on Amazon EC2 instances, the supported log drivers are `awslogs`, `fluentd`, `gelf`, `json-file`, `journald`,`syslog`, `splunk`, and `awsfirelens`.
+ This parameter requires version 1.18 of the Docker Remote API or greater on your container instance.
+ For tasks that are hosted on Amazon EC2 instances, the Amazon ECS container agent must register the available logging drivers with the `ECS_AVAILABLE_LOGGING_DRIVERS` environment variable before containers placed on that instance can use these log configuration options. For more information, see [Amazon ECS container agent configuration](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) in the *Amazon Elastic Container Service Developer Guide*.
+ For tasks that are on AWS Fargate, because you don't have access to the underlying infrastructure your tasks are hosted on, any additional software needed must be installed outside of the task. For example, the Fluentd output aggregators or a remote host running Logstash to send Gelf logs to.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-logconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-logconfiguration-syntax.json"></a>

```
{
  "[LogDriver](#cfn-ecs-daemontaskdefinition-logconfiguration-logdriver)" : String,
  "[Options](#cfn-ecs-daemontaskdefinition-logconfiguration-options)" : {Key: Value, ...},
  "[SecretOptions](#cfn-ecs-daemontaskdefinition-logconfiguration-secretoptions)" : [ Secret, ... ]
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-logconfiguration-syntax.yaml"></a>

```
  [LogDriver](#cfn-ecs-daemontaskdefinition-logconfiguration-logdriver): String
  [Options](#cfn-ecs-daemontaskdefinition-logconfiguration-options): 
    Key: Value
  [SecretOptions](#cfn-ecs-daemontaskdefinition-logconfiguration-secretoptions): 
    - Secret
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-logconfiguration-properties"></a>

`LogDriver`  <a name="cfn-ecs-daemontaskdefinition-logconfiguration-logdriver"></a>
The log driver to use for the container.  
For tasks on AWS Fargate, the supported log drivers are `awslogs`, `splunk`, and `awsfirelens`.  
For tasks hosted on Amazon EC2 instances, the supported log drivers are `awslogs`, `fluentd`, `gelf`, `json-file`, `journald`, `syslog`, `splunk`, and `awsfirelens`.  
For more information about using the `awslogs` log driver, see [Send Amazon ECS logs to CloudWatch](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) in the *Amazon Elastic Container Service Developer Guide*.  
For more information about using the `awsfirelens` log driver, see [Send Amazon ECS logs to an AWS service or AWS Partner](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html).  
If you have a custom driver that isn't listed, you can fork the Amazon ECS container agent project that's [available on GitHub](https://github.com/aws/amazon-ecs-agent) and customize it to work with that driver. We encourage you to submit pull requests for changes that you would like to have included. However, we don't currently provide support for running modified copies of this software.
*Required*: Yes  
*Type*: String  
*Allowed values*: `json-file | syslog | journald | gelf | fluentd | awslogs | splunk | awsfirelens`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Options`  <a name="cfn-ecs-daemontaskdefinition-logconfiguration-options"></a>
The configuration options to send to the log driver.  
The options you can specify depend on the log driver. Some of the options you can specify when you use the `awslogs` log driver to route logs to Amazon CloudWatch include the following:    
awslogs-create-group  
Required: No  
Specify whether you want the log group to be created automatically. If this option isn't specified, it defaults to `false`.  
Your IAM policy must include the `logs:CreateLogGroup` permission before you attempt to use `awslogs-create-group`.  
awslogs-region  
Required: Yes  
Specify the AWS Region that the `awslogs` log driver is to send your Docker logs to. You can choose to send all of your logs from clusters in different Regions to a single region in CloudWatch Logs. This is so that they're all visible in one location. Otherwise, you can separate them by Region for more granularity. Make sure that the specified log group exists in the Region that you specify with this option.  
awslogs-group  
Required: Yes  
Make sure to specify a log group that the `awslogs` log driver sends its log streams to.  
awslogs-stream-prefix  
Required: Yes, when using Fargate.Optional when using EC2.  
Use the `awslogs-stream-prefix` option to associate a log stream with the specified prefix, the container name, and the ID of the Amazon ECS task that the container belongs to. If you specify a prefix with this option, then the log stream takes the format `prefix-name/container-name/ecs-task-id`.  
If you don't specify a prefix with this option, then the log stream is named after the container ID that's assigned by the Docker daemon on the container instance. Because it's difficult to trace logs back to the container that sent them with just the Docker container ID (which is only available on the container instance), we recommend that you specify a prefix with this option.  
For Amazon ECS services, you can use the service name as the prefix. Doing so, you can trace log streams to the service that the container belongs to, the name of the container that sent them, and the ID of the task that the container belongs to.  
You must specify a stream-prefix for your logs to have your logs appear in the Log pane when using the Amazon ECS console.  
awslogs-datetime-format  
Required: No  
This option defines a multiline start pattern in Python `strftime` format. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages.  
One example of a use case for using this format is for parsing output such as a stack dump, which might otherwise be logged in multiple entries. The correct pattern allows it to be captured in a single entry.  
For more information, see [awslogs-datetime-format](https://docs.docker.com/config/containers/logging/awslogs/#awslogs-datetime-format).  
You cannot configure both the `awslogs-datetime-format` and `awslogs-multiline-pattern` options.  
Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance.  
awslogs-multiline-pattern  
Required: No  
This option defines a multiline start pattern that uses a regular expression. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages.  
For more information, see [awslogs-multiline-pattern](https://docs.docker.com/config/containers/logging/awslogs/#awslogs-multiline-pattern).  
This option is ignored if `awslogs-datetime-format` is also configured.  
You cannot configure both the `awslogs-datetime-format` and `awslogs-multiline-pattern` options.  
Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance.
The following options apply to all supported log drivers.    
mode  
Required: No  
Valid values: `non-blocking` \$1 `blocking`  
This option defines the delivery mode of log messages from the container to the log driver specified using `logDriver`. The delivery mode you choose affects application availability when the flow of logs from container is interrupted.  
If you use the `blocking` mode and the flow of logs is interrupted, calls from container code to write to the `stdout` and `stderr` streams will block. The logging thread of the application will block as a result. This may cause the application to become unresponsive and lead to container healthcheck failure.   
If you use the `non-blocking` mode, the container's logs are instead stored in an in-memory intermediate buffer configured with the `max-buffer-size` option. This prevents the application from becoming unresponsive when logs cannot be sent. We recommend using this mode if you want to ensure service availability and are okay with some log loss. For more information, see [Preventing log loss with non-blocking mode in the `awslogs` container log driver](https://aws.amazon.com/blogs/containers/preventing-log-loss-with-non-blocking-mode-in-the-awslogs-container-log-driver/).  
You can set a default `mode` for all containers in a specific AWS Region by using the `defaultLogDriverMode` account setting. If you don't specify the `mode` option or configure the account setting, Amazon ECS will default to the `non-blocking` mode. For more information about the account setting, see [Default log driver mode](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#default-log-driver-mode) in the *Amazon Elastic Container Service Developer Guide*.  
On June 25, 2025, Amazon ECS changed the default log driver mode from `blocking` to `non-blocking` to prioritize task availability over logging. To continue using the `blocking` mode after this change, do one of the following:  
+ Set the `mode` option in your container definition's `logConfiguration` as `blocking`.
+ Set the `defaultLogDriverMode` account setting to `blocking`.  
max-buffer-size  
Required: No  
Default value: `10m`  
When `non-blocking` mode is used, the `max-buffer-size` log option controls the size of the buffer that's used for intermediate message storage. Make sure to specify an adequate buffer size based on your application. When the buffer fills up, further logs cannot be stored. Logs that cannot be stored are lost. 
To route logs using the `splunk` log router, you need to specify a `splunk-token` and a `splunk-url`.  
When you use the `awsfirelens` log router to route logs to an AWS Service or AWS Partner Network destination for log storage and analytics, you can set the `log-driver-buffer-limit` option to limit the number of events that are buffered in memory, before being sent to the log router container. It can help to resolve potential log loss issue because high throughput might result in memory running out for the buffer inside of Docker.  
Other options you can specify when using `awsfirelens` to route logs depend on the destination. When you export logs to Amazon Data Firehose, you can specify the AWS Region with `region` and a name for the log stream with `delivery_stream`.  
When you export logs to Amazon Kinesis Data Streams, you can specify an AWS Region with `region` and a data stream name with `stream`.  
 When you export logs to Amazon OpenSearch Service, you can specify options like `Name`, `Host` (OpenSearch Service endpoint without protocol), `Port`, `Index`, `Type`, `Aws_auth`, `Aws_region`, `Suppress_Type_Name`, and `tls`. For more information, see [Under the hood: FireLens for Amazon ECS Tasks](https://aws.amazon.com/blogs/containers/under-the-hood-firelens-for-amazon-ecs-tasks/).  
When you export logs to Amazon S3, you can specify the bucket using the `bucket` option. You can also specify `region`, `total_file_size`, `upload_timeout`, and `use_put_object` as options.  
This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`  
*Required*: No  
*Type*: Object of String  
*Pattern*: `.{1,}`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SecretOptions`  <a name="cfn-ecs-daemontaskdefinition-logconfiguration-secretoptions"></a>
The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: Array of [Secret](aws-properties-ecs-daemontaskdefinition-secret.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition MountPoint
<a name="aws-properties-ecs-daemontaskdefinition-mountpoint"></a>

The details for a volume mount point that's used in a container definition.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-mountpoint-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-mountpoint-syntax.json"></a>

```
{
  "[ContainerPath](#cfn-ecs-daemontaskdefinition-mountpoint-containerpath)" : String,
  "[ReadOnly](#cfn-ecs-daemontaskdefinition-mountpoint-readonly)" : Boolean,
  "[SourceVolume](#cfn-ecs-daemontaskdefinition-mountpoint-sourcevolume)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-mountpoint-syntax.yaml"></a>

```
  [ContainerPath](#cfn-ecs-daemontaskdefinition-mountpoint-containerpath): String
  [ReadOnly](#cfn-ecs-daemontaskdefinition-mountpoint-readonly): Boolean
  [SourceVolume](#cfn-ecs-daemontaskdefinition-mountpoint-sourcevolume): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-mountpoint-properties"></a>

`ContainerPath`  <a name="cfn-ecs-daemontaskdefinition-mountpoint-containerpath"></a>
The path on the container to mount the host volume at.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ReadOnly`  <a name="cfn-ecs-daemontaskdefinition-mountpoint-readonly"></a>
If this value is `true`, the container has read-only access to the volume. If this value is `false`, then the container can write to the volume. The default value is `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceVolume`  <a name="cfn-ecs-daemontaskdefinition-mountpoint-sourcevolume"></a>
The name of the volume to mount. Must be a volume name referenced in the `name` parameter of task definition `volume`.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition RepositoryCredentials
<a name="aws-properties-ecs-daemontaskdefinition-repositorycredentials"></a>

The repository credentials for private registry authentication.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-repositorycredentials-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-repositorycredentials-syntax.json"></a>

```
{
  "[CredentialsParameter](#cfn-ecs-daemontaskdefinition-repositorycredentials-credentialsparameter)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-repositorycredentials-syntax.yaml"></a>

```
  [CredentialsParameter](#cfn-ecs-daemontaskdefinition-repositorycredentials-credentialsparameter): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-repositorycredentials-properties"></a>

`CredentialsParameter`  <a name="cfn-ecs-daemontaskdefinition-repositorycredentials-credentialsparameter"></a>
The Amazon Resource Name (ARN) of the secret containing the private repository credentials.  
When you use the Amazon ECS API, AWS CLI, or AWS SDK, if the secret exists in the same Region as the task that you're launching then you can use either the full ARN or the name of the secret. When you use the AWS Management Console, you must specify the full ARN of the secret.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition RestartPolicy
<a name="aws-properties-ecs-daemontaskdefinition-restartpolicy"></a>

<a name="aws-properties-ecs-daemontaskdefinition-restartpolicy-description"></a>The `RestartPolicy` property type specifies Property description not available. for an [AWS::ECS::DaemonTaskDefinition](aws-resource-ecs-daemontaskdefinition.md).

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-restartpolicy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-restartpolicy-syntax.json"></a>

```
{
  "[Enabled](#cfn-ecs-daemontaskdefinition-restartpolicy-enabled)" : Boolean,
  "[IgnoredExitCodes](#cfn-ecs-daemontaskdefinition-restartpolicy-ignoredexitcodes)" : [ Integer, ... ],
  "[RestartAttemptPeriod](#cfn-ecs-daemontaskdefinition-restartpolicy-restartattemptperiod)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-restartpolicy-syntax.yaml"></a>

```
  [Enabled](#cfn-ecs-daemontaskdefinition-restartpolicy-enabled): Boolean
  [IgnoredExitCodes](#cfn-ecs-daemontaskdefinition-restartpolicy-ignoredexitcodes): 
    - Integer
  [RestartAttemptPeriod](#cfn-ecs-daemontaskdefinition-restartpolicy-restartattemptperiod): Integer
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-restartpolicy-properties"></a>

`Enabled`  <a name="cfn-ecs-daemontaskdefinition-restartpolicy-enabled"></a>
Property description not available.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`IgnoredExitCodes`  <a name="cfn-ecs-daemontaskdefinition-restartpolicy-ignoredexitcodes"></a>
Property description not available.  
*Required*: No  
*Type*: Array of Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestartAttemptPeriod`  <a name="cfn-ecs-daemontaskdefinition-restartpolicy-restartattemptperiod"></a>
Property description not available.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition Secret
<a name="aws-properties-ecs-daemontaskdefinition-secret"></a>

An object representing the secret to expose to your container. Secrets can be exposed to a container in the following ways:
+ To inject sensitive data into your containers as environment variables, use the `secrets` container definition parameter.
+ To reference sensitive information in the log configuration of a container, use the `secretOptions` container definition parameter.

For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-secret-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-secret-syntax.json"></a>

```
{
  "[Name](#cfn-ecs-daemontaskdefinition-secret-name)" : String,
  "[ValueFrom](#cfn-ecs-daemontaskdefinition-secret-valuefrom)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-secret-syntax.yaml"></a>

```
  [Name](#cfn-ecs-daemontaskdefinition-secret-name): String
  [ValueFrom](#cfn-ecs-daemontaskdefinition-secret-valuefrom): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-secret-properties"></a>

`Name`  <a name="cfn-ecs-daemontaskdefinition-secret-name"></a>
The name of the secret.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ValueFrom`  <a name="cfn-ecs-daemontaskdefinition-secret-valuefrom"></a>
The secret to expose to the container. The supported values are either the full ARN of the AWS Secrets Manager secret or the full ARN of the parameter in the SSM Parameter Store.  
For information about the require AWS Identity and Access Management permissions, see [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-secrets.html#secrets-iam) (for Secrets Manager) or [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-parameters.html) (for Systems Manager Parameter store) in the *Amazon Elastic Container Service Developer Guide*.  
If the SSM Parameter Store parameter exists in the same Region as the task you're launching, then you can use either the full ARN or name of the parameter. If the parameter exists in a different Region, then the full ARN must be specified.
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition SystemControl
<a name="aws-properties-ecs-daemontaskdefinition-systemcontrol"></a>

A list of namespaced kernel parameters to set in the container. This parameter maps to `Sysctls` in the docker container create command and the `--sysctl` option to docker run. For example, you can configure `net.ipv4.tcp_keepalive_time` setting to maintain longer lived connections.

We don't recommend that you specify network-related `systemControls` parameters for multiple containers in a single task that also uses either the `awsvpc` or `host` network mode. Doing this has the following disadvantages:
+ For tasks that use the `awsvpc` network mode including Fargate, if you set `systemControls` for any container, it applies to all containers in the task. If you set different `systemControls` for multiple containers in a single task, the container that's started last determines which `systemControls` take effect.
+ For tasks that use the `host` network mode, the network namespace `systemControls` aren't supported.

If you're setting an IPC resource namespace to use for the containers in the task, the following conditions apply to your system controls. For more information, see [IPC mode](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_definition_ipcmode).
+ For tasks that use the `host` IPC mode, IPC namespace `systemControls` aren't supported.
+ For tasks that use the `task` IPC mode, IPC namespace `systemControls` values apply to all containers within a task.

**Note**  
This parameter is not supported for Windows containers.

**Note**  
This parameter is only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version `1.4.0` or later (Linux). This isn't supported for Windows containers on Fargate.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-systemcontrol-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-systemcontrol-syntax.json"></a>

```
{
  "[Namespace](#cfn-ecs-daemontaskdefinition-systemcontrol-namespace)" : String,
  "[Value](#cfn-ecs-daemontaskdefinition-systemcontrol-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-systemcontrol-syntax.yaml"></a>

```
  [Namespace](#cfn-ecs-daemontaskdefinition-systemcontrol-namespace): String
  [Value](#cfn-ecs-daemontaskdefinition-systemcontrol-value): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-systemcontrol-properties"></a>

`Namespace`  <a name="cfn-ecs-daemontaskdefinition-systemcontrol-namespace"></a>
The namespaced kernel parameter to set a `value` for.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-ecs-daemontaskdefinition-systemcontrol-value"></a>
The namespaced kernel parameter to set a `value` for.  
Valid IPC namespace values: `"kernel.msgmax" | "kernel.msgmnb" | "kernel.msgmni" | "kernel.sem" | "kernel.shmall" | "kernel.shmmax" | "kernel.shmmni" | "kernel.shm_rmid_forced"`, and `Sysctls` that start with `"fs.mqueue.*"`  
Valid network namespace values: `Sysctls` that start with `"net.*"`. Only namespaced `Sysctls` that exist within the container starting with "net.\$1 are accepted.  
All of these values are supported by Fargate.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition Tag
<a name="aws-properties-ecs-daemontaskdefinition-tag"></a>

The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

The following basic restrictions apply to tags:
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-tag-syntax.json"></a>

```
{
  "[Key](#cfn-ecs-daemontaskdefinition-tag-key)" : String,
  "[Value](#cfn-ecs-daemontaskdefinition-tag-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-tag-syntax.yaml"></a>

```
  [Key](#cfn-ecs-daemontaskdefinition-tag-key): String
  [Value](#cfn-ecs-daemontaskdefinition-tag-value): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-tag-properties"></a>

`Key`  <a name="cfn-ecs-daemontaskdefinition-tag-key"></a>
One part of a key-value pair that make up a tag. A `key` is a general label that acts like a category for more specific tag values.  
*Required*: No  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ecs-daemontaskdefinition-tag-value"></a>
The optional part of a key-value pair that make up a tag. A `value` acts as a descriptor within a tag category (key).  
*Required*: No  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::DaemonTaskDefinition Tmpfs
<a name="aws-properties-ecs-daemontaskdefinition-tmpfs"></a>

The container path, mount options, and size of the tmpfs mount.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-tmpfs-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-tmpfs-syntax.json"></a>

```
{
  "[ContainerPath](#cfn-ecs-daemontaskdefinition-tmpfs-containerpath)" : String,
  "[MountOptions](#cfn-ecs-daemontaskdefinition-tmpfs-mountoptions)" : [ String, ... ],
  "[Size](#cfn-ecs-daemontaskdefinition-tmpfs-size)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-tmpfs-syntax.yaml"></a>

```
  [ContainerPath](#cfn-ecs-daemontaskdefinition-tmpfs-containerpath): String
  [MountOptions](#cfn-ecs-daemontaskdefinition-tmpfs-mountoptions): 
    - String
  [Size](#cfn-ecs-daemontaskdefinition-tmpfs-size): Integer
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-tmpfs-properties"></a>

`ContainerPath`  <a name="cfn-ecs-daemontaskdefinition-tmpfs-containerpath"></a>
The absolute file path where the tmpfs volume is to be mounted.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MountOptions`  <a name="cfn-ecs-daemontaskdefinition-tmpfs-mountoptions"></a>
The list of tmpfs volume mount options.  
Valid values: `"defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev" | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" | "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "mpol"`  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Size`  <a name="cfn-ecs-daemontaskdefinition-tmpfs-size"></a>
The maximum size (in MiB) of the tmpfs volume.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition Ulimit
<a name="aws-properties-ecs-daemontaskdefinition-ulimit"></a>

The `ulimit` settings to pass to the container.

Amazon ECS tasks hosted on AWS Fargate use the default resource limit values set by the operating system with the exception of the `nofile` resource limit parameter which AWS Fargate overrides. The `nofile` resource limit sets a restriction on the number of open files that a container can use. The default `nofile` soft limit is ` 65535` and the default hard limit is `65535`.

You can specify the `ulimit` settings for a container in a task definition.

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-ulimit-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-ulimit-syntax.json"></a>

```
{
  "[HardLimit](#cfn-ecs-daemontaskdefinition-ulimit-hardlimit)" : Integer,
  "[Name](#cfn-ecs-daemontaskdefinition-ulimit-name)" : String,
  "[SoftLimit](#cfn-ecs-daemontaskdefinition-ulimit-softlimit)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-ulimit-syntax.yaml"></a>

```
  [HardLimit](#cfn-ecs-daemontaskdefinition-ulimit-hardlimit): Integer
  [Name](#cfn-ecs-daemontaskdefinition-ulimit-name): String
  [SoftLimit](#cfn-ecs-daemontaskdefinition-ulimit-softlimit): Integer
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-ulimit-properties"></a>

`HardLimit`  <a name="cfn-ecs-daemontaskdefinition-ulimit-hardlimit"></a>
The hard limit for the `ulimit` type. The value can be specified in bytes, seconds, or as a count, depending on the `type` of the `ulimit`.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-ecs-daemontaskdefinition-ulimit-name"></a>
The `type` of the `ulimit`.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `core | cpu | data | fsize | locks | memlock | msgqueue | nice | nofile | nproc | rss | rtprio | rttime | sigpending | stack`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SoftLimit`  <a name="cfn-ecs-daemontaskdefinition-ulimit-softlimit"></a>
The soft limit for the `ulimit` type. The value can be specified in bytes, seconds, or as a count, depending on the `type` of the `ulimit`.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::DaemonTaskDefinition Volume
<a name="aws-properties-ecs-daemontaskdefinition-volume"></a>

The data volume configuration for tasks launched using this task definition. Specifying a volume configuration in a task definition is optional. The volume configuration may contain multiple volumes but only one volume configured at launch is supported. Each volume defined in the volume configuration may only specify a `name` and one of either `configuredAtLaunch`, `dockerVolumeConfiguration`, `efsVolumeConfiguration`, `fsxWindowsFileServerVolumeConfiguration`, or `host`. If an empty volume configuration is specified, by default Amazon ECS uses a host volume. For more information, see [Using data volumes in tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html).

## Syntax
<a name="aws-properties-ecs-daemontaskdefinition-volume-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-daemontaskdefinition-volume-syntax.json"></a>

```
{
  "[Host](#cfn-ecs-daemontaskdefinition-volume-host)" : HostVolumeProperties,
  "[Name](#cfn-ecs-daemontaskdefinition-volume-name)" : String
}
```

### YAML
<a name="aws-properties-ecs-daemontaskdefinition-volume-syntax.yaml"></a>

```
  [Host](#cfn-ecs-daemontaskdefinition-volume-host): 
    HostVolumeProperties
  [Name](#cfn-ecs-daemontaskdefinition-volume-name): String
```

## Properties
<a name="aws-properties-ecs-daemontaskdefinition-volume-properties"></a>

`Host`  <a name="cfn-ecs-daemontaskdefinition-volume-host"></a>
This parameter is specified when you use bind mount host volumes. The contents of the `host` parameter determine whether your bind mount host volume persists on the host container instance and where it's stored. If the `host` parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data isn't guaranteed to persist after the containers that are associated with it stop running.  
Windows containers can mount whole directories on the same drive as `$env:ProgramData`. Windows containers can't mount directories on a different drive, and mount point can't be across drives. For example, you can mount `C:\my\path:C:\my\path` and `D:\:D:\`, but not `D:\my\path:C:\my\path` or `D:\:C:\my\path`.  
*Required*: No  
*Type*: [HostVolumeProperties](aws-properties-ecs-daemontaskdefinition-hostvolumeproperties.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-ecs-daemontaskdefinition-volume-name"></a>
The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.  
When using a volume configured at launch, the `name` is required and must also be specified as the volume name in the `ServiceVolumeConfiguration` or `TaskVolumeConfiguration` parameter when creating your service or standalone task.  
For all other types of volumes, this name is referenced in the `sourceVolume` parameter of the `mountPoints` object in the container definition.  
When a volume is using the `efsVolumeConfiguration`, the name is required.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::ExpressGatewayService
<a name="aws-resource-ecs-expressgatewayservice"></a>

Creates an Express service that simplifies deploying containerized web applications on Amazon ECS with managed AWS infrastructure. This operation provisions and configures Application Load Balancers, target groups, security groups, and auto-scaling policies automatically.

Specify a primary container configuration with your application image and basic settings. Amazon ECS creates the necessary AWS resources for traffic distribution, health monitoring, network access control, and capacity management.

Provide an execution role for task operations and an infrastructure role for managing AWS resources on your behalf.

## Syntax
<a name="aws-resource-ecs-expressgatewayservice-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ecs-expressgatewayservice-syntax.json"></a>

```
{
  "Type" : "AWS::ECS::ExpressGatewayService",
  "Properties" : {
      "[Cluster](#cfn-ecs-expressgatewayservice-cluster)" : String,
      "[Cpu](#cfn-ecs-expressgatewayservice-cpu)" : String,
      "[ExecutionRoleArn](#cfn-ecs-expressgatewayservice-executionrolearn)" : String,
      "[HealthCheckPath](#cfn-ecs-expressgatewayservice-healthcheckpath)" : String,
      "[InfrastructureRoleArn](#cfn-ecs-expressgatewayservice-infrastructurerolearn)" : String,
      "[Memory](#cfn-ecs-expressgatewayservice-memory)" : String,
      "[NetworkConfiguration](#cfn-ecs-expressgatewayservice-networkconfiguration)" : ExpressGatewayServiceNetworkConfiguration,
      "[PrimaryContainer](#cfn-ecs-expressgatewayservice-primarycontainer)" : ExpressGatewayContainer,
      "[ScalingTarget](#cfn-ecs-expressgatewayservice-scalingtarget)" : ExpressGatewayScalingTarget,
      "[ServiceName](#cfn-ecs-expressgatewayservice-servicename)" : String,
      "[Tags](#cfn-ecs-expressgatewayservice-tags)" : [ Tag, ... ],
      "[TaskRoleArn](#cfn-ecs-expressgatewayservice-taskrolearn)" : String
    }
}
```

### YAML
<a name="aws-resource-ecs-expressgatewayservice-syntax.yaml"></a>

```
Type: AWS::ECS::ExpressGatewayService
Properties:
  [Cluster](#cfn-ecs-expressgatewayservice-cluster): String
  [Cpu](#cfn-ecs-expressgatewayservice-cpu): String
  [ExecutionRoleArn](#cfn-ecs-expressgatewayservice-executionrolearn): String
  [HealthCheckPath](#cfn-ecs-expressgatewayservice-healthcheckpath): String
  [InfrastructureRoleArn](#cfn-ecs-expressgatewayservice-infrastructurerolearn): String
  [Memory](#cfn-ecs-expressgatewayservice-memory): String
  [NetworkConfiguration](#cfn-ecs-expressgatewayservice-networkconfiguration): 
    ExpressGatewayServiceNetworkConfiguration
  [PrimaryContainer](#cfn-ecs-expressgatewayservice-primarycontainer): 
    ExpressGatewayContainer
  [ScalingTarget](#cfn-ecs-expressgatewayservice-scalingtarget): 
    ExpressGatewayScalingTarget
  [ServiceName](#cfn-ecs-expressgatewayservice-servicename): String
  [Tags](#cfn-ecs-expressgatewayservice-tags): 
    - Tag
  [TaskRoleArn](#cfn-ecs-expressgatewayservice-taskrolearn): String
```

## Properties
<a name="aws-resource-ecs-expressgatewayservice-properties"></a>

`Cluster`  <a name="cfn-ecs-expressgatewayservice-cluster"></a>
The short name or full ARN of the cluster that hosts the Express service.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Cpu`  <a name="cfn-ecs-expressgatewayservice-cpu"></a>
The CPU allocation for tasks in this service revision.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ExecutionRoleArn`  <a name="cfn-ecs-expressgatewayservice-executionrolearn"></a>
The ARN of the task execution role for the service revision.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HealthCheckPath`  <a name="cfn-ecs-expressgatewayservice-healthcheckpath"></a>
The health check path for this service revision.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`InfrastructureRoleArn`  <a name="cfn-ecs-expressgatewayservice-infrastructurerolearn"></a>
The ARN of the infrastructure role that manages AWS resources for the Express service.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Memory`  <a name="cfn-ecs-expressgatewayservice-memory"></a>
The memory allocation for tasks in this service revision.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NetworkConfiguration`  <a name="cfn-ecs-expressgatewayservice-networkconfiguration"></a>
The network configuration for tasks in this service revision.  
*Required*: No  
*Type*: [ExpressGatewayServiceNetworkConfiguration](aws-properties-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PrimaryContainer`  <a name="cfn-ecs-expressgatewayservice-primarycontainer"></a>
The primary container configuration for this service revision.  
*Required*: Yes  
*Type*: [ExpressGatewayContainer](aws-properties-ecs-expressgatewayservice-expressgatewaycontainer.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScalingTarget`  <a name="cfn-ecs-expressgatewayservice-scalingtarget"></a>
The auto-scaling configuration for this service revision.  
*Required*: No  
*Type*: [ExpressGatewayScalingTarget](aws-properties-ecs-expressgatewayservice-expressgatewayscalingtarget.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServiceName`  <a name="cfn-ecs-expressgatewayservice-servicename"></a>
The name of the Express service.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-ecs-expressgatewayservice-tags"></a>
The metadata applied to the Express service.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-ecs-expressgatewayservice-tag.md)  
*Minimum*: `0`  
*Maximum*: `50`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TaskRoleArn`  <a name="cfn-ecs-expressgatewayservice-taskrolearn"></a>
The ARN of the task role for the service revision.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-ecs-expressgatewayservice-return-values"></a>

### Ref
<a name="aws-resource-ecs-expressgatewayservice-return-values-ref"></a>

### Fn::GetAtt
<a name="aws-resource-ecs-expressgatewayservice-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-ecs-expressgatewayservice-return-values-fn--getatt-fn--getatt"></a>

`ActiveConfigurations`  <a name="ActiveConfigurations-fn::getatt"></a>
The list of active service configurations for the Express service.

`CreatedAt`  <a name="CreatedAt-fn::getatt"></a>
The Unix timestamp for when the Express service was created.

`ECSManagedResourceArns.AutoScaling.ApplicationAutoScalingPolicies`  <a name="ECSManagedResourceArns.AutoScaling.ApplicationAutoScalingPolicies-fn::getatt"></a>
The list of Auto Scaling policy ARNs associated with the express service.

`ECSManagedResourceArns.AutoScaling.ScalableTarget`  <a name="ECSManagedResourceArns.AutoScaling.ScalableTarget-fn::getatt"></a>
The Auto Scaling Scalable Target ARN associated with the express service.

`ECSManagedResourceArns.IngressPath.CertificateArn`  <a name="ECSManagedResourceArns.IngressPath.CertificateArn-fn::getatt"></a>
The Certificate ARN associated with the express service.

`ECSManagedResourceArns.IngressPath.ListenerArn`  <a name="ECSManagedResourceArns.IngressPath.ListenerArn-fn::getatt"></a>
The ARN of the Load Balancer listener associated with the express service.

`ECSManagedResourceArns.IngressPath.ListenerRuleArn`  <a name="ECSManagedResourceArns.IngressPath.ListenerRuleArn-fn::getatt"></a>
The ARN of the Load Balancer listener rule associated with the express service.

`ECSManagedResourceArns.IngressPath.LoadBalancerArn`  <a name="ECSManagedResourceArns.IngressPath.LoadBalancerArn-fn::getatt"></a>
The ARN of the Load Balancer associated with the express service.

`ECSManagedResourceArns.IngressPath.LoadBalancerSecurityGroups`  <a name="ECSManagedResourceArns.IngressPath.LoadBalancerSecurityGroups-fn::getatt"></a>
The list of Load Balancer Security Group ARNs associated with the express service.

`ECSManagedResourceArns.IngressPath.TargetGroupArns`  <a name="ECSManagedResourceArns.IngressPath.TargetGroupArns-fn::getatt"></a>
The list of Target Group ARNs associated with the express service.

`ECSManagedResourceArns.LogGroups`  <a name="ECSManagedResourceArns.LogGroups-fn::getatt"></a>
The list of Log Group ARNs associated with the express service.

`ECSManagedResourceArns.MetricAlarms`  <a name="ECSManagedResourceArns.MetricAlarms-fn::getatt"></a>
The list of Metric Alarm ARNs associated with the express service.

`ECSManagedResourceArns.ServiceSecurityGroups`  <a name="ECSManagedResourceArns.ServiceSecurityGroups-fn::getatt"></a>
The list of Security Group ARNs associated with the express service.

`Endpoint`  <a name="Endpoint-fn::getatt"></a>
The Endpoint of the express service.

`ServiceArn`  <a name="ServiceArn-fn::getatt"></a>
The ARN that identifies the Express service.

`UpdatedAt`  <a name="UpdatedAt-fn::getatt"></a>
The Unix timestamp for when the Express service was last updated.

# AWS::ECS::ExpressGatewayService AutoScalingArns
<a name="aws-properties-ecs-expressgatewayservice-autoscalingarns"></a>

<a name="aws-properties-ecs-expressgatewayservice-autoscalingarns-description"></a>The `AutoScalingArns` property type specifies Property description not available. for an [AWS::ECS::ExpressGatewayService](aws-resource-ecs-expressgatewayservice.md).

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-autoscalingarns-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-autoscalingarns-syntax.json"></a>

```
{
  "[ApplicationAutoScalingPolicies](#cfn-ecs-expressgatewayservice-autoscalingarns-applicationautoscalingpolicies)" : [ String, ... ],
  "[ScalableTarget](#cfn-ecs-expressgatewayservice-autoscalingarns-scalabletarget)" : String
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-autoscalingarns-syntax.yaml"></a>

```
  [ApplicationAutoScalingPolicies](#cfn-ecs-expressgatewayservice-autoscalingarns-applicationautoscalingpolicies): 
    - String
  [ScalableTarget](#cfn-ecs-expressgatewayservice-autoscalingarns-scalabletarget): String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-autoscalingarns-properties"></a>

`ApplicationAutoScalingPolicies`  <a name="cfn-ecs-expressgatewayservice-autoscalingarns-applicationautoscalingpolicies"></a>
Property description not available.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScalableTarget`  <a name="cfn-ecs-expressgatewayservice-autoscalingarns-scalabletarget"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService ECSManagedResourceArns
<a name="aws-properties-ecs-expressgatewayservice-ecsmanagedresourcearns"></a>

<a name="aws-properties-ecs-expressgatewayservice-ecsmanagedresourcearns-description"></a>The `ECSManagedResourceArns` property type specifies Property description not available. for an [AWS::ECS::ExpressGatewayService](aws-resource-ecs-expressgatewayservice.md).

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-ecsmanagedresourcearns-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-ecsmanagedresourcearns-syntax.json"></a>

```
{
  "[AutoScaling](#cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-autoscaling)" : AutoScalingArns,
  "[IngressPath](#cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-ingresspath)" : IngressPathArns,
  "[LogGroups](#cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-loggroups)" : [ String, ... ],
  "[MetricAlarms](#cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-metricalarms)" : [ String, ... ],
  "[ServiceSecurityGroups](#cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-servicesecuritygroups)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-ecsmanagedresourcearns-syntax.yaml"></a>

```
  [AutoScaling](#cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-autoscaling): 
    AutoScalingArns
  [IngressPath](#cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-ingresspath): 
    IngressPathArns
  [LogGroups](#cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-loggroups): 
    - String
  [MetricAlarms](#cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-metricalarms): 
    - String
  [ServiceSecurityGroups](#cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-servicesecuritygroups): 
    - String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-ecsmanagedresourcearns-properties"></a>

`AutoScaling`  <a name="cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-autoscaling"></a>
Property description not available.  
*Required*: No  
*Type*: [AutoScalingArns](aws-properties-ecs-expressgatewayservice-autoscalingarns.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IngressPath`  <a name="cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-ingresspath"></a>
Property description not available.  
*Required*: No  
*Type*: [IngressPathArns](aws-properties-ecs-expressgatewayservice-ingresspatharns.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogGroups`  <a name="cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-loggroups"></a>
Property description not available.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MetricAlarms`  <a name="cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-metricalarms"></a>
Property description not available.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServiceSecurityGroups`  <a name="cfn-ecs-expressgatewayservice-ecsmanagedresourcearns-servicesecuritygroups"></a>
Property description not available.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService ExpressGatewayContainer
<a name="aws-properties-ecs-expressgatewayservice-expressgatewaycontainer"></a>

Defines the configuration for the primary container in an Express service. This container receives traffic from the Application Load Balancer and runs your application code.

The container configuration includes the container image, port mapping, logging settings, environment variables, and secrets. The container image is the only required parameter, with sensible defaults provided for other settings.

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-expressgatewaycontainer-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-expressgatewaycontainer-syntax.json"></a>

```
{
  "[AwsLogsConfiguration](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-awslogsconfiguration)" : ExpressGatewayServiceAwsLogsConfiguration,
  "[Command](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-command)" : [ String, ... ],
  "[ContainerPort](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-containerport)" : Integer,
  "[Environment](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-environment)" : [ KeyValuePair, ... ],
  "[Image](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-image)" : String,
  "[RepositoryCredentials](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-repositorycredentials)" : ExpressGatewayRepositoryCredentials,
  "[Secrets](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-secrets)" : [ Secret, ... ]
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-expressgatewaycontainer-syntax.yaml"></a>

```
  [AwsLogsConfiguration](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-awslogsconfiguration): 
    ExpressGatewayServiceAwsLogsConfiguration
  [Command](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-command): 
    - String
  [ContainerPort](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-containerport): Integer
  [Environment](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-environment): 
    - KeyValuePair
  [Image](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-image): String
  [RepositoryCredentials](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-repositorycredentials): 
    ExpressGatewayRepositoryCredentials
  [Secrets](#cfn-ecs-expressgatewayservice-expressgatewaycontainer-secrets): 
    - Secret
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-expressgatewaycontainer-properties"></a>

`AwsLogsConfiguration`  <a name="cfn-ecs-expressgatewayservice-expressgatewaycontainer-awslogsconfiguration"></a>
The log configuration for the container.  
*Required*: No  
*Type*: [ExpressGatewayServiceAwsLogsConfiguration](aws-properties-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Command`  <a name="cfn-ecs-expressgatewayservice-expressgatewaycontainer-command"></a>
The command that is passed to the container.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ContainerPort`  <a name="cfn-ecs-expressgatewayservice-expressgatewaycontainer-containerport"></a>
The port number on the container that receives traffic from the load balancer. Default is 80.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Environment`  <a name="cfn-ecs-expressgatewayservice-expressgatewaycontainer-environment"></a>
The environment variables to pass to the container.  
*Required*: No  
*Type*: Array of [KeyValuePair](aws-properties-ecs-expressgatewayservice-keyvaluepair.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Image`  <a name="cfn-ecs-expressgatewayservice-expressgatewaycontainer-image"></a>
The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with either `repository-url/image:tag` or `repository-url/image@digest`.  
For Express services, the image typically contains a web application that listens on the specified container port. The image can be stored in Amazon ECR, Docker Hub, or any other container registry accessible to your execution role.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RepositoryCredentials`  <a name="cfn-ecs-expressgatewayservice-expressgatewaycontainer-repositorycredentials"></a>
The configuration for repository credentials for private registry authentication.  
*Required*: No  
*Type*: [ExpressGatewayRepositoryCredentials](aws-properties-ecs-expressgatewayservice-expressgatewayrepositorycredentials.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Secrets`  <a name="cfn-ecs-expressgatewayservice-expressgatewaycontainer-secrets"></a>
The secrets to pass to the container.  
*Required*: No  
*Type*: Array of [Secret](aws-properties-ecs-expressgatewayservice-secret.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService ExpressGatewayRepositoryCredentials
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayrepositorycredentials"></a>

The repository credentials for private registry authentication to pass to the container.

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayrepositorycredentials-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayrepositorycredentials-syntax.json"></a>

```
{
  "[CredentialsParameter](#cfn-ecs-expressgatewayservice-expressgatewayrepositorycredentials-credentialsparameter)" : String
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayrepositorycredentials-syntax.yaml"></a>

```
  [CredentialsParameter](#cfn-ecs-expressgatewayservice-expressgatewayrepositorycredentials-credentialsparameter): String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayrepositorycredentials-properties"></a>

`CredentialsParameter`  <a name="cfn-ecs-expressgatewayservice-expressgatewayrepositorycredentials-credentialsparameter"></a>
The Amazon Resource Name (ARN) of the secret containing the private repository credentials.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService ExpressGatewayScalingTarget
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayscalingtarget"></a>

Defines the auto-scaling configuration for an Express service. This determines how the service automatically adjusts the number of running tasks based on demand metrics such as CPU utilization, memory utilization, or request count per target.

Auto-scaling helps ensure your application can handle varying levels of traffic while optimizing costs by scaling down during low-demand periods. You can specify the minimum and maximum number of tasks, the scaling metric, and the target value for that metric.

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayscalingtarget-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayscalingtarget-syntax.json"></a>

```
{
  "[AutoScalingMetric](#cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-autoscalingmetric)" : String,
  "[AutoScalingTargetValue](#cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-autoscalingtargetvalue)" : Integer,
  "[MaxTaskCount](#cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-maxtaskcount)" : Integer,
  "[MinTaskCount](#cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-mintaskcount)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayscalingtarget-syntax.yaml"></a>

```
  [AutoScalingMetric](#cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-autoscalingmetric): String
  [AutoScalingTargetValue](#cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-autoscalingtargetvalue): Integer
  [MaxTaskCount](#cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-maxtaskcount): Integer
  [MinTaskCount](#cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-mintaskcount): Integer
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayscalingtarget-properties"></a>

`AutoScalingMetric`  <a name="cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-autoscalingmetric"></a>
The metric used for auto-scaling decisions. The default metric used for an Express service is `CPUUtilization`.  
*Required*: No  
*Type*: String  
*Allowed values*: `AVERAGE_CPU | AVERAGE_MEMORY | REQUEST_COUNT_PER_TARGET`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`AutoScalingTargetValue`  <a name="cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-autoscalingtargetvalue"></a>
The target value for the auto-scaling metric. The default value for an Express service is 60.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaxTaskCount`  <a name="cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-maxtaskcount"></a>
The maximum number of tasks to run in the Express service.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinTaskCount`  <a name="cfn-ecs-expressgatewayservice-expressgatewayscalingtarget-mintaskcount"></a>
The minimum number of tasks to run in the Express service.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService ExpressGatewayServiceAwsLogsConfiguration
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration"></a>

Specifies the Amazon CloudWatch Logs configuration for the Express service container.

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration-syntax.json"></a>

```
{
  "[LogGroup](#cfn-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration-loggroup)" : String,
  "[LogStreamPrefix](#cfn-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration-logstreamprefix)" : String
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration-syntax.yaml"></a>

```
  [LogGroup](#cfn-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration-loggroup): String
  [LogStreamPrefix](#cfn-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration-logstreamprefix): String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration-properties"></a>

`LogGroup`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration-loggroup"></a>
The name of the CloudWatch Logs log group to send container logs to.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogStreamPrefix`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceawslogsconfiguration-logstreamprefix"></a>
The prefix for the CloudWatch Logs log stream names. The default for an Express service is `ecs`.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService ExpressGatewayServiceConfiguration
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayserviceconfiguration"></a>

Represents a specific configuration revision of an Express service, containing all the settings and parameters for that revision.

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayserviceconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayserviceconfiguration-syntax.json"></a>

```
{
  "[Cpu](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-cpu)" : String,
  "[CreatedAt](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-createdat)" : String,
  "[ExecutionRoleArn](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-executionrolearn)" : String,
  "[HealthCheckPath](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-healthcheckpath)" : String,
  "[IngressPaths](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-ingresspaths)" : [ IngressPathSummary, ... ],
  "[Memory](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-memory)" : String,
  "[NetworkConfiguration](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-networkconfiguration)" : ExpressGatewayServiceNetworkConfiguration,
  "[PrimaryContainer](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-primarycontainer)" : ExpressGatewayContainer,
  "[ScalingTarget](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-scalingtarget)" : ExpressGatewayScalingTarget,
  "[ServiceRevisionArn](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-servicerevisionarn)" : String,
  "[TaskRoleArn](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-taskrolearn)" : String
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayserviceconfiguration-syntax.yaml"></a>

```
  [Cpu](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-cpu): String
  [CreatedAt](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-createdat): String
  [ExecutionRoleArn](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-executionrolearn): String
  [HealthCheckPath](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-healthcheckpath): String
  [IngressPaths](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-ingresspaths): 
    - IngressPathSummary
  [Memory](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-memory): String
  [NetworkConfiguration](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-networkconfiguration): 
    ExpressGatewayServiceNetworkConfiguration
  [PrimaryContainer](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-primarycontainer): 
    ExpressGatewayContainer
  [ScalingTarget](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-scalingtarget): 
    ExpressGatewayScalingTarget
  [ServiceRevisionArn](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-servicerevisionarn): String
  [TaskRoleArn](#cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-taskrolearn): String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayserviceconfiguration-properties"></a>

`Cpu`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-cpu"></a>
The CPU allocation for tasks in this service revision.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CreatedAt`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-createdat"></a>
The Unix timestamp for when this service revision was created.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ExecutionRoleArn`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-executionrolearn"></a>
The ARN of the task execution role for the service revision.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HealthCheckPath`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-healthcheckpath"></a>
The health check path for this service revision.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IngressPaths`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-ingresspaths"></a>
The entry point into this service revision.  
*Required*: No  
*Type*: Array of [IngressPathSummary](aws-properties-ecs-expressgatewayservice-ingresspathsummary.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Memory`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-memory"></a>
The memory allocation for tasks in this service revision.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NetworkConfiguration`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-networkconfiguration"></a>
The network configuration for tasks in this service revision.  
*Required*: No  
*Type*: [ExpressGatewayServiceNetworkConfiguration](aws-properties-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PrimaryContainer`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-primarycontainer"></a>
The primary container configuration for this service revision.  
*Required*: No  
*Type*: [ExpressGatewayContainer](aws-properties-ecs-expressgatewayservice-expressgatewaycontainer.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ScalingTarget`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-scalingtarget"></a>
The auto-scaling configuration for this service revision.  
*Required*: No  
*Type*: [ExpressGatewayScalingTarget](aws-properties-ecs-expressgatewayservice-expressgatewayscalingtarget.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServiceRevisionArn`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-servicerevisionarn"></a>
The ARN of the service revision.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TaskRoleArn`  <a name="cfn-ecs-expressgatewayservice-expressgatewayserviceconfiguration-taskrolearn"></a>
The ARN of the task role for the service revision.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService ExpressGatewayServiceNetworkConfiguration
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration"></a>

The network configuration for an Express service. By default, an Express service utilizes subnets and security groups associated with the default VPC.

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration-syntax.json"></a>

```
{
  "[SecurityGroups](#cfn-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration-securitygroups)" : [ String, ... ],
  "[Subnets](#cfn-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration-subnets)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration-syntax.yaml"></a>

```
  [SecurityGroups](#cfn-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration-securitygroups): 
    - String
  [Subnets](#cfn-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration-subnets): 
    - String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration-properties"></a>

`SecurityGroups`  <a name="cfn-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration-securitygroups"></a>
The IDs of the security groups associated with the Express service.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Subnets`  <a name="cfn-ecs-expressgatewayservice-expressgatewayservicenetworkconfiguration-subnets"></a>
The IDs of the subnets associated with the Express service.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService ExpressGatewayServiceStatus
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayservicestatus"></a>

An object that defines the status of Express service creation and information about the status of the service.

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayservicestatus-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayservicestatus-syntax.json"></a>

```
{
  "[StatusCode](#cfn-ecs-expressgatewayservice-expressgatewayservicestatus-statuscode)" : String
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayservicestatus-syntax.yaml"></a>

```
  [StatusCode](#cfn-ecs-expressgatewayservice-expressgatewayservicestatus-statuscode): String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-expressgatewayservicestatus-properties"></a>

`StatusCode`  <a name="cfn-ecs-expressgatewayservice-expressgatewayservicestatus-statuscode"></a>
The status of the Express service.  
*Required*: No  
*Type*: String  
*Allowed values*: `ACTIVE | DRAINING | INACTIVE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService IngressPathArns
<a name="aws-properties-ecs-expressgatewayservice-ingresspatharns"></a>

<a name="aws-properties-ecs-expressgatewayservice-ingresspatharns-description"></a>The `IngressPathArns` property type specifies Property description not available. for an [AWS::ECS::ExpressGatewayService](aws-resource-ecs-expressgatewayservice.md).

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-ingresspatharns-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-ingresspatharns-syntax.json"></a>

```
{
  "[CertificateArn](#cfn-ecs-expressgatewayservice-ingresspatharns-certificatearn)" : String,
  "[ListenerArn](#cfn-ecs-expressgatewayservice-ingresspatharns-listenerarn)" : String,
  "[ListenerRuleArn](#cfn-ecs-expressgatewayservice-ingresspatharns-listenerrulearn)" : String,
  "[LoadBalancerArn](#cfn-ecs-expressgatewayservice-ingresspatharns-loadbalancerarn)" : String,
  "[LoadBalancerSecurityGroups](#cfn-ecs-expressgatewayservice-ingresspatharns-loadbalancersecuritygroups)" : [ String, ... ],
  "[TargetGroupArns](#cfn-ecs-expressgatewayservice-ingresspatharns-targetgrouparns)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-ingresspatharns-syntax.yaml"></a>

```
  [CertificateArn](#cfn-ecs-expressgatewayservice-ingresspatharns-certificatearn): String
  [ListenerArn](#cfn-ecs-expressgatewayservice-ingresspatharns-listenerarn): String
  [ListenerRuleArn](#cfn-ecs-expressgatewayservice-ingresspatharns-listenerrulearn): String
  [LoadBalancerArn](#cfn-ecs-expressgatewayservice-ingresspatharns-loadbalancerarn): String
  [LoadBalancerSecurityGroups](#cfn-ecs-expressgatewayservice-ingresspatharns-loadbalancersecuritygroups): 
    - String
  [TargetGroupArns](#cfn-ecs-expressgatewayservice-ingresspatharns-targetgrouparns): 
    - String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-ingresspatharns-properties"></a>

`CertificateArn`  <a name="cfn-ecs-expressgatewayservice-ingresspatharns-certificatearn"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ListenerArn`  <a name="cfn-ecs-expressgatewayservice-ingresspatharns-listenerarn"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ListenerRuleArn`  <a name="cfn-ecs-expressgatewayservice-ingresspatharns-listenerrulearn"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LoadBalancerArn`  <a name="cfn-ecs-expressgatewayservice-ingresspatharns-loadbalancerarn"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LoadBalancerSecurityGroups`  <a name="cfn-ecs-expressgatewayservice-ingresspatharns-loadbalancersecuritygroups"></a>
Property description not available.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetGroupArns`  <a name="cfn-ecs-expressgatewayservice-ingresspatharns-targetgrouparns"></a>
Property description not available.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService IngressPathSummary
<a name="aws-properties-ecs-expressgatewayservice-ingresspathsummary"></a>

The entry point into an Express service.

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-ingresspathsummary-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-ingresspathsummary-syntax.json"></a>

```
{
  "[AccessType](#cfn-ecs-expressgatewayservice-ingresspathsummary-accesstype)" : String,
  "[Endpoint](#cfn-ecs-expressgatewayservice-ingresspathsummary-endpoint)" : String
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-ingresspathsummary-syntax.yaml"></a>

```
  [AccessType](#cfn-ecs-expressgatewayservice-ingresspathsummary-accesstype): String
  [Endpoint](#cfn-ecs-expressgatewayservice-ingresspathsummary-endpoint): String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-ingresspathsummary-properties"></a>

`AccessType`  <a name="cfn-ecs-expressgatewayservice-ingresspathsummary-accesstype"></a>
The type of access to the endpoint for the Express service.  
*Required*: No  
*Type*: String  
*Allowed values*: `PUBLIC | PRIVATE`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Endpoint`  <a name="cfn-ecs-expressgatewayservice-ingresspathsummary-endpoint"></a>
The endpoint for access to the service.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService KeyValuePair
<a name="aws-properties-ecs-expressgatewayservice-keyvaluepair"></a>

A key-value pair object.

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-keyvaluepair-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-keyvaluepair-syntax.json"></a>

```
{
  "[Name](#cfn-ecs-expressgatewayservice-keyvaluepair-name)" : String,
  "[Value](#cfn-ecs-expressgatewayservice-keyvaluepair-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-keyvaluepair-syntax.yaml"></a>

```
  [Name](#cfn-ecs-expressgatewayservice-keyvaluepair-name): String
  [Value](#cfn-ecs-expressgatewayservice-keyvaluepair-value): String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-keyvaluepair-properties"></a>

`Name`  <a name="cfn-ecs-expressgatewayservice-keyvaluepair-name"></a>
The name of the key-value pair. For environment variables, this is the name of the environment variable.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ecs-expressgatewayservice-keyvaluepair-value"></a>
The value of the key-value pair. For environment variables, this is the value of the environment variable.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService Secret
<a name="aws-properties-ecs-expressgatewayservice-secret"></a>

An object representing the secret to expose to your container. Secrets can be exposed to a container in the following ways:
+ To inject sensitive data into your containers as environment variables, use the `secrets` container definition parameter.
+ To reference sensitive information in the log configuration of a container, use the `secretOptions` container definition parameter.

For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-secret-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-secret-syntax.json"></a>

```
{
  "[Name](#cfn-ecs-expressgatewayservice-secret-name)" : String,
  "[ValueFrom](#cfn-ecs-expressgatewayservice-secret-valuefrom)" : String
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-secret-syntax.yaml"></a>

```
  [Name](#cfn-ecs-expressgatewayservice-secret-name): String
  [ValueFrom](#cfn-ecs-expressgatewayservice-secret-valuefrom): String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-secret-properties"></a>

`Name`  <a name="cfn-ecs-expressgatewayservice-secret-name"></a>
The name of the secret.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ValueFrom`  <a name="cfn-ecs-expressgatewayservice-secret-valuefrom"></a>
The secret to expose to the container. The supported values are either the full ARN of the AWS Secrets Manager secret or the full ARN of the parameter in the SSM Parameter Store.  
For information about the require AWS Identity and Access Management permissions, see [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-secrets.html#secrets-iam) (for Secrets Manager) or [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-parameters.html) (for Systems Manager Parameter store) in the *Amazon Elastic Container Service Developer Guide*.  
If the SSM Parameter Store parameter exists in the same Region as the task you're launching, then you can use either the full ARN or name of the parameter. If the parameter exists in a different Region, then the full ARN must be specified.
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::ExpressGatewayService Tag
<a name="aws-properties-ecs-expressgatewayservice-tag"></a>

The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

The following basic restrictions apply to tags:
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

## Syntax
<a name="aws-properties-ecs-expressgatewayservice-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-expressgatewayservice-tag-syntax.json"></a>

```
{
  "[Key](#cfn-ecs-expressgatewayservice-tag-key)" : String,
  "[Value](#cfn-ecs-expressgatewayservice-tag-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-expressgatewayservice-tag-syntax.yaml"></a>

```
  [Key](#cfn-ecs-expressgatewayservice-tag-key): String
  [Value](#cfn-ecs-expressgatewayservice-tag-value): String
```

## Properties
<a name="aws-properties-ecs-expressgatewayservice-tag-properties"></a>

`Key`  <a name="cfn-ecs-expressgatewayservice-tag-key"></a>
One part of a key-value pair that make up a tag. A `key` is a general label that acts like a category for more specific tag values.  
*Required*: Yes  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-ecs-expressgatewayservice-tag-value"></a>
The optional part of a key-value pair that make up a tag. A `value` acts as a descriptor within a tag category (key).  
*Required*: Yes  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::PrimaryTaskSet
<a name="aws-resource-ecs-primarytaskset"></a>

Modifies which task set in a service is the primary task set. Any parameters that are updated on the primary task set in a service will transition to the service. This is used when a service uses the `EXTERNAL` deployment controller type. For more information, see [Amazon ECS Deployment Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-resource-ecs-primarytaskset-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ecs-primarytaskset-syntax.json"></a>

```
{
  "Type" : "AWS::ECS::PrimaryTaskSet",
  "Properties" : {
      "[Cluster](#cfn-ecs-primarytaskset-cluster)" : String,
      "[Service](#cfn-ecs-primarytaskset-service)" : String,
      "[TaskSetId](#cfn-ecs-primarytaskset-tasksetid)" : String
    }
}
```

### YAML
<a name="aws-resource-ecs-primarytaskset-syntax.yaml"></a>

```
Type: AWS::ECS::PrimaryTaskSet
Properties:
  [Cluster](#cfn-ecs-primarytaskset-cluster): String
  [Service](#cfn-ecs-primarytaskset-service): String
  [TaskSetId](#cfn-ecs-primarytaskset-tasksetid): String
```

## Properties
<a name="aws-resource-ecs-primarytaskset-properties"></a>

`Cluster`  <a name="cfn-ecs-primarytaskset-cluster"></a>
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task set exists in.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Service`  <a name="cfn-ecs-primarytaskset-service"></a>
The short name or full Amazon Resource Name (ARN) of the service that the task set exists in.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TaskSetId`  <a name="cfn-ecs-primarytaskset-tasksetid"></a>
The short name or full Amazon Resource Name (ARN) of the task set to set as the primary task set in the deployment.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-ecs-primarytaskset-return-values"></a>

### Ref
<a name="aws-resource-ecs-primarytaskset-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

# AWS::ECS::Service
<a name="aws-resource-ecs-service"></a>

The `AWS::ECS::Service` resource creates an Amazon Elastic Container Service (Amazon ECS) service that runs and maintains the requested number of tasks and associated load balancers.

**Important**  
The stack update fails if you change any properties that require replacement and at least one Amazon ECS Service Connect `ServiceConnectConfiguration` property is configured. This is because AWS CloudFormation creates the replacement service first, but each `ServiceConnectService` must have a name that is unique in the namespace.

**Note**  
Starting April 15, 2023, AWS; will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performance. After April 15, 2023, new customers will not be able to launch instances with Amazon EI accelerators in Amazon SageMaker, Amazon ECS, or Amazon EC2. However, customers who have used Amazon EI at least once during the past 30-day period are considered current customers and will be able to continue using the service. 

**Important**  
On June 12, 2025, Amazon ECS launched support for updating capacity provider configuration for Amazon ECS services. With this launch, Amazon ECS also aligned the CloudFormation update behavior for `CapacityProviderStrategy` parameter with the standard practice. For more information, see [Amazon ECS adds support for updating capacity provider configuration for ECS services](https://aws.amazon.com/about-aws/whats-new/2025/05/amazon-ecs-capacity-provider-configuration-ecs/). Previously Amazon ECS ignored the `CapacityProviderStrategy` property if it was set to an empty list for example, `[]` in CloudFormation, because updating capacity provider configuration was not supported. Now, with support for capacity provider updates, customers can remove capacity providers from a service by passing an empty list. When you specify an empty list (`[]`) for the `CapacityProviderStrategy` property in your CloudFormation template, Amazon ECS will remove any capacity providers associated with the service, as follows:  
For services created with a capacity provider strategy after the launch:  
If there's a cluster default strategy set, the service will revert to using that default strategy.
If no cluster default strategy exists, you will receive the following error:  
No launch type to fall back to for empty capacity provider strategy. Your service was not created with a launch type.
For services created with a capacity provider strategy prior to the launch:  
If `CapacityProviderStrategy` had `FARGATE_SPOT` or `FARGATE` capacity providers, the launch type will be updated to `FARGATE` and the capacity provider will be removed.
If the strategy included Auto Scaling group capacity providers, the service will revert to EC2 launch type, and the Auto Scaling group capacity providers will not be used.
Recommended Actions  
If you are currently using `CapacityProviderStrategy: []` in your CloudFormation templates, you should take one of the following actions:  
If you do not intend to update the Capacity Provider Strategy:  
Remove the `CapacityProviderStrategy` property entirely from your CloudFormation template
Alternatively, use `!Ref AWS::NoValue` for the `CapacityProviderStrategy` property in your template
If you intend to maintain or update the Capacity Provider Strategy, specify the actual Capacity Provider Strategy for the service in your CloudFormation template.
If your CloudFormation template had an empty list ([]) for `CapacityProviderStrategy` prior to the aforementioned launch on June 12, and you are using the same template with `CapacityProviderStrategy: []`, you might encounter the following error:  
 Invalid request provided: When switching from launch type to capacity provider strategy on an existing service, or making a change to a capacity provider strategy on a service that is already using one, you must force a new deployment. (Service: Ecs, Status Code: 400, Request ID: xxx) (SDK Attempt Count: 1)" (RequestToken: xxx HandlerErrorCode: InvalidRequest)   
Note that CloudFormation automatically initiates a new deployment when it detects a parameter change, but customers cannot choose to force a deployment through CloudFormation. This is an invalid input scenario that requires one of the remediation actions listed above.  
If you are experiencing active production issues related to this change, contact AWS Support or your Technical Account Manager.

## Syntax
<a name="aws-resource-ecs-service-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ecs-service-syntax.json"></a>

```
{
  "Type" : "AWS::ECS::Service",
  "Properties" : {
      "[AvailabilityZoneRebalancing](#cfn-ecs-service-availabilityzonerebalancing)" : String,
      "[CapacityProviderStrategy](#cfn-ecs-service-capacityproviderstrategy)" : [ CapacityProviderStrategyItem, ... ],
      "[Cluster](#cfn-ecs-service-cluster)" : String,
      "[DeploymentConfiguration](#cfn-ecs-service-deploymentconfiguration)" : DeploymentConfiguration,
      "[DeploymentController](#cfn-ecs-service-deploymentcontroller)" : DeploymentController,
      "[DesiredCount](#cfn-ecs-service-desiredcount)" : Integer,
      "[EnableECSManagedTags](#cfn-ecs-service-enableecsmanagedtags)" : Boolean,
      "[EnableExecuteCommand](#cfn-ecs-service-enableexecutecommand)" : Boolean,
      "[ForceNewDeployment](#cfn-ecs-service-forcenewdeployment)" : ForceNewDeployment,
      "[HealthCheckGracePeriodSeconds](#cfn-ecs-service-healthcheckgraceperiodseconds)" : Integer,
      "[LaunchType](#cfn-ecs-service-launchtype)" : String,
      "[LoadBalancers](#cfn-ecs-service-loadbalancers)" : [ LoadBalancer, ... ],
      "[NetworkConfiguration](#cfn-ecs-service-networkconfiguration)" : NetworkConfiguration,
      "[PlacementConstraints](#cfn-ecs-service-placementconstraints)" : [ PlacementConstraint, ... ],
      "[PlacementStrategies](#cfn-ecs-service-placementstrategies)" : [ PlacementStrategy, ... ],
      "[PlatformVersion](#cfn-ecs-service-platformversion)" : String,
      "[PropagateTags](#cfn-ecs-service-propagatetags)" : String,
      "[Role](#cfn-ecs-service-role)" : String,
      "[SchedulingStrategy](#cfn-ecs-service-schedulingstrategy)" : String,
      "[ServiceConnectConfiguration](#cfn-ecs-service-serviceconnectconfiguration)" : ServiceConnectConfiguration,
      "[ServiceName](#cfn-ecs-service-servicename)" : String,
      "[ServiceRegistries](#cfn-ecs-service-serviceregistries)" : [ ServiceRegistry, ... ],
      "[Tags](#cfn-ecs-service-tags)" : [ Tag, ... ],
      "[TaskDefinition](#cfn-ecs-service-taskdefinition)" : String,
      "[VolumeConfigurations](#cfn-ecs-service-volumeconfigurations)" : [ ServiceVolumeConfiguration, ... ],
      "[VpcLatticeConfigurations](#cfn-ecs-service-vpclatticeconfigurations)" : [ VpcLatticeConfiguration, ... ]
    }
}
```

### YAML
<a name="aws-resource-ecs-service-syntax.yaml"></a>

```
Type: AWS::ECS::Service
Properties:
  [AvailabilityZoneRebalancing](#cfn-ecs-service-availabilityzonerebalancing): String
  [CapacityProviderStrategy](#cfn-ecs-service-capacityproviderstrategy): 
    - CapacityProviderStrategyItem
  [Cluster](#cfn-ecs-service-cluster): String
  [DeploymentConfiguration](#cfn-ecs-service-deploymentconfiguration): 
    DeploymentConfiguration
  [DeploymentController](#cfn-ecs-service-deploymentcontroller): 
    DeploymentController
  [DesiredCount](#cfn-ecs-service-desiredcount): Integer
  [EnableECSManagedTags](#cfn-ecs-service-enableecsmanagedtags): Boolean
  [EnableExecuteCommand](#cfn-ecs-service-enableexecutecommand): Boolean
  [ForceNewDeployment](#cfn-ecs-service-forcenewdeployment): 
    ForceNewDeployment
  [HealthCheckGracePeriodSeconds](#cfn-ecs-service-healthcheckgraceperiodseconds): Integer
  [LaunchType](#cfn-ecs-service-launchtype): String
  [LoadBalancers](#cfn-ecs-service-loadbalancers): 
    - LoadBalancer
  [NetworkConfiguration](#cfn-ecs-service-networkconfiguration): 
    NetworkConfiguration
  [PlacementConstraints](#cfn-ecs-service-placementconstraints): 
    - PlacementConstraint
  [PlacementStrategies](#cfn-ecs-service-placementstrategies): 
    - PlacementStrategy
  [PlatformVersion](#cfn-ecs-service-platformversion): String
  [PropagateTags](#cfn-ecs-service-propagatetags): String
  [Role](#cfn-ecs-service-role): String
  [SchedulingStrategy](#cfn-ecs-service-schedulingstrategy): String
  [ServiceConnectConfiguration](#cfn-ecs-service-serviceconnectconfiguration): 
    ServiceConnectConfiguration
  [ServiceName](#cfn-ecs-service-servicename): String
  [ServiceRegistries](#cfn-ecs-service-serviceregistries): 
    - ServiceRegistry
  [Tags](#cfn-ecs-service-tags): 
    - Tag
  [TaskDefinition](#cfn-ecs-service-taskdefinition): String
  [VolumeConfigurations](#cfn-ecs-service-volumeconfigurations): 
    - ServiceVolumeConfiguration
  [VpcLatticeConfigurations](#cfn-ecs-service-vpclatticeconfigurations): 
    - VpcLatticeConfiguration
```

## Properties
<a name="aws-resource-ecs-service-properties"></a>

`AvailabilityZoneRebalancing`  <a name="cfn-ecs-service-availabilityzonerebalancing"></a>
Indicates whether to use Availability Zone rebalancing for the service.  
For more information, see [Balancing an Amazon ECS service across Availability Zones](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-rebalancing.html) in the * *Amazon Elastic Container Service Developer Guide* *.  
The default behavior of `AvailabilityZoneRebalancing` differs between create and update requests:  
+ For create service requests, when no value is specified for `AvailabilityZoneRebalancing`, Amazon ECS defaults the value to `ENABLED`.
+ For update service requests, when no value is specified for `AvailabilityZoneRebalancing`, Amazon ECS defaults to the existing service’s `AvailabilityZoneRebalancing` value. If the service never had an `AvailabilityZoneRebalancing` value set, Amazon ECS treats this as `DISABLED`.
*Required*: No  
*Type*: String  
*Allowed values*: `ENABLED | DISABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CapacityProviderStrategy`  <a name="cfn-ecs-service-capacityproviderstrategy"></a>
The capacity provider strategy to use for the service.  
If a `capacityProviderStrategy` is specified, the `launchType` parameter must be omitted. If no `capacityProviderStrategy` or `launchType` is specified, the `defaultCapacityProviderStrategy` for the cluster is used.  
A capacity provider strategy can contain a maximum of 20 capacity providers.  
To remove this property from your service resource, specify an empty `CapacityProviderStrategyItem` array.
*Required*: No  
*Type*: Array of [CapacityProviderStrategyItem](aws-properties-ecs-service-capacityproviderstrategyitem.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Cluster`  <a name="cfn-ecs-service-cluster"></a>
The short name or full Amazon Resource Name (ARN) of the cluster that you run your service on. If you do not specify a cluster, the default cluster is assumed.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DeploymentConfiguration`  <a name="cfn-ecs-service-deploymentconfiguration"></a>
Optional deployment parameters that control how many tasks run during the deployment and the ordering of stopping and starting tasks.  
*Required*: No  
*Type*: [DeploymentConfiguration](aws-properties-ecs-service-deploymentconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeploymentController`  <a name="cfn-ecs-service-deploymentcontroller"></a>
The deployment controller to use for the service.   
*Required*: No  
*Type*: [DeploymentController](aws-properties-ecs-service-deploymentcontroller.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DesiredCount`  <a name="cfn-ecs-service-desiredcount"></a>
The number of instantiations of the specified task definition to place and keep running in your service.  
For new services, if a desired count is not specified, a default value of `1` is used. When using the `DAEMON` scheduling strategy, the desired count is not required.  
For existing services, if a desired count is not specified, it is omitted from the operation.  
*Required*: Conditional  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableECSManagedTags`  <a name="cfn-ecs-service-enableecsmanagedtags"></a>
Specifies whether to turn on Amazon ECS managed tags for the tasks within the service. For more information, see [Tagging your Amazon ECS resources](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-using-tags.html) in the *Amazon Elastic Container Service Developer Guide*.  
When you use Amazon ECS managed tags, you must set the `propagateTags` request parameter.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`EnableExecuteCommand`  <a name="cfn-ecs-service-enableexecutecommand"></a>
Determines whether the execute command functionality is turned on for the service. If `true`, the execute command functionality is turned on for all containers in tasks as part of the service.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ForceNewDeployment`  <a name="cfn-ecs-service-forcenewdeployment"></a>
Determines whether to force a new deployment of the service. By default, deployments aren't forced. You can use this option to start a new deployment with no service definition changes. For example, you can update a service's tasks to use a newer Docker image with the same image/tag combination (`my_image:latest`) or to roll Fargate tasks onto a newer platform version.  
*Required*: No  
*Type*: [ForceNewDeployment](aws-properties-ecs-service-forcenewdeployment.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HealthCheckGracePeriodSeconds`  <a name="cfn-ecs-service-healthcheckgraceperiodseconds"></a>
The period of time, in seconds, that the Amazon ECS service scheduler ignores unhealthy Elastic Load Balancing, VPC Lattice, and container health checks after a task has first started. If you do not specify a health check grace period value, the default value of 0 is used. If you do not use any of the health checks, then `healthCheckGracePeriodSeconds` is unused.  
If your service has more running tasks than desired, unhealthy tasks in the grace period might be stopped to reach the desired count.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LaunchType`  <a name="cfn-ecs-service-launchtype"></a>
The launch type on which to run your service. For more information, see [Amazon ECS Launch Types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) in the *Amazon Elastic Container Service Developer Guide*.  
If you want to use Managed Instances, you must use the `capacityProviderStrategy` request parameter
*Required*: No  
*Type*: String  
*Allowed values*: `EC2 | FARGATE | EXTERNAL`  
*Update requires*: [Some interruptions](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-some-interrupt)

`LoadBalancers`  <a name="cfn-ecs-service-loadbalancers"></a>
A list of load balancer objects to associate with the service. If you specify the `Role` property, `LoadBalancers` must be specified as well. For information about the number of load balancers that you can specify per service, see [Service Load Balancing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-load-balancing.html) in the *Amazon Elastic Container Service Developer Guide*.  
To remove this property from your service resource, specify an empty `LoadBalancer` array.
*Required*: No  
*Type*: Array of [LoadBalancer](aws-properties-ecs-service-loadbalancer.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`NetworkConfiguration`  <a name="cfn-ecs-service-networkconfiguration"></a>
The network configuration for the service. This parameter is required for task definitions that use the `awsvpc` network mode to receive their own elastic network interface, and it is not supported for other network modes. For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: Conditional  
*Type*: [NetworkConfiguration](aws-properties-ecs-service-networkconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PlacementConstraints`  <a name="cfn-ecs-service-placementconstraints"></a>
An array of placement constraint objects to use for tasks in your service. You can specify a maximum of 10 constraints for each task. This limit includes constraints in the task definition and those specified at runtime.  
To remove this property from your service resource, specify an empty `PlacementConstraint` array.
*Required*: No  
*Type*: Array of [PlacementConstraint](aws-properties-ecs-service-placementconstraint.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PlacementStrategies`  <a name="cfn-ecs-service-placementstrategies"></a>
The placement strategy objects to use for tasks in your service. You can specify a maximum of 5 strategy rules for each service.  
To remove this property from your service resource, specify an empty `PlacementStrategy` array.
*Required*: No  
*Type*: Array of [PlacementStrategy](aws-properties-ecs-service-placementstrategy.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PlatformVersion`  <a name="cfn-ecs-service-platformversion"></a>
The platform version that your tasks in the service are running on. A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the `LATEST` platform version is used. For more information, see [AWS Fargate platform versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PropagateTags`  <a name="cfn-ecs-service-propagatetags"></a>
Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags aren't propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use the [TagResource](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_TagResource.html) API action.  
You must set this to a value other than `NONE` when you use Cost Explorer. For more information, see [Amazon ECS usage reports](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/usage-reports.html) in the *Amazon Elastic Container Service Developer Guide*.  
The default is `NONE`.  
*Required*: No  
*Type*: String  
*Allowed values*: `SERVICE | TASK_DEFINITION`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Role`  <a name="cfn-ecs-service-role"></a>
The name or full Amazon Resource Name (ARN) of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is only permitted if you are using a load balancer with your service and your task definition doesn't use the `awsvpc` network mode. If you specify the `role` parameter, you must also specify a load balancer object with the `loadBalancers` parameter.  
If your account has already created the Amazon ECS service-linked role, that role is used for your service unless you specify a role here. The service-linked role is required if your task definition uses the `awsvpc` network mode or if the service is configured to use service discovery, an external deployment controller, multiple target groups, or Elastic Inference accelerators in which case you don't specify a role here. For more information, see [Using service-linked roles for Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html) in the *Amazon Elastic Container Service Developer Guide*.
If your specified role has a path other than `/`, then you must either specify the full role ARN (this is recommended) or prefix the role name with the path. For example, if a role with the name `bar` has a path of `/foo/` then you would specify `/foo/bar` as the role name. For more information, see [Friendly names and paths](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-friendly-names) in the *IAM User Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SchedulingStrategy`  <a name="cfn-ecs-service-schedulingstrategy"></a>
The scheduling strategy to use for the service. For more information, see [Services](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html).  
There are two service scheduler strategies available:  
+ `REPLICA`-The replica scheduling strategy places and maintains the desired number of tasks across your cluster. By default, the service scheduler spreads tasks across Availability Zones. You can use task placement strategies and constraints to customize task placement decisions. This scheduler strategy is required if the service uses the `CODE_DEPLOY` or `EXTERNAL` deployment controller types.
+ `DAEMON`-The daemon scheduling strategy deploys exactly one task on each active container instance that meets all of the task placement constraints that you specify in your cluster. The service scheduler also evaluates the task placement constraints for running tasks and will stop tasks that don't meet the placement constraints. When you're using this strategy, you don't need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies.
**Note**  
Tasks using the Fargate launch type or the `CODE_DEPLOY` or `EXTERNAL` deployment controller types don't support the `DAEMON` scheduling strategy.
*Required*: No  
*Type*: String  
*Allowed values*: `DAEMON | REPLICA`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ServiceConnectConfiguration`  <a name="cfn-ecs-service-serviceconnectconfiguration"></a>
The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.  
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: [ServiceConnectConfiguration](aws-properties-ecs-service-serviceconnectconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ServiceName`  <a name="cfn-ecs-service-servicename"></a>
The name of your service. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. Service names must be unique within a cluster, but you can have similarly named services in multiple clusters within a Region or across multiple Regions.  
The stack update fails if you change any properties that require replacement and the `ServiceName` is configured. This is because AWS CloudFormation creates the replacement service first, but each `ServiceName` must be unique in the cluster.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ServiceRegistries`  <a name="cfn-ecs-service-serviceregistries"></a>
The details of the service discovery registry to associate with this service. For more information, see [Service discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html).  
Each service may be associated with one service registry. Multiple service registries for each service isn't supported.
To remove this property from your service resource, specify an empty `ServiceRegistry` array.
*Required*: No  
*Type*: Array of [ServiceRegistry](aws-properties-ecs-service-serviceregistry.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-ecs-service-tags"></a>
The metadata that you apply to the service to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. When a service is deleted, the tags are deleted as well.  
The following basic restrictions apply to tags:  
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
*Required*: No  
*Type*: Array of [Tag](aws-properties-ecs-service-tag.md)  
*Minimum*: `0`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TaskDefinition`  <a name="cfn-ecs-service-taskdefinition"></a>
The `family` and `revision` (`family:revision`) or full ARN of the task definition to run in your service. If a `revision` isn't specified, the latest `ACTIVE` revision is used.  
A task definition must be specified if the service uses either the `ECS` or `CODE_DEPLOY` deployment controllers.  
For more information about deployment types, see [Amazon ECS deployment types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VolumeConfigurations`  <a name="cfn-ecs-service-volumeconfigurations"></a>
The configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume.  
To remove this property from your service resource, specify an empty `ServiceVolumeConfiguration` array.
*Required*: No  
*Type*: Array of [ServiceVolumeConfiguration](aws-properties-ecs-service-servicevolumeconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VpcLatticeConfigurations`  <a name="cfn-ecs-service-vpclatticeconfigurations"></a>
The VPC Lattice configuration for the service being created.  
*Required*: No  
*Type*: Array of [VpcLatticeConfiguration](aws-properties-ecs-service-vpclatticeconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Return values
<a name="aws-resource-ecs-service-return-values"></a>

### Ref
<a name="aws-resource-ecs-service-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the Amazon Resource Name (ARN).

In the following example, the `Ref` function returns the ARN of the `MyECSService` service, such as `arn:aws:ecs:us-west-2:123456789012:service/sample-webapp`.

 `{ "Ref": "MyECSService" }` 

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-ecs-service-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-ecs-service-return-values-fn--getatt-fn--getatt"></a>

`Name`  <a name="Name-fn::getatt"></a>
The name of the Amazon ECS service, such as `sample-webapp`.

`ServiceArn`  <a name="ServiceArn-fn::getatt"></a>
The ARN that identifies the service. For more information about the ARN format, see [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids) in the *Amazon ECS Developer Guide*.

## Examples
<a name="aws-resource-ecs-service--examples"></a>



**Topics**
+ [Create a service that uses a task definition](#aws-resource-ecs-service--examples--Create_a_service_that_uses_a_task_definition)
+ [Create a service with a volume configuration](#aws-resource-ecs-service--examples--Create_a_service_with_a_volume_configuration)
+ [Associate an Application Load Balancer with a service](#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service)

### Create a service that uses a task definition
<a name="aws-resource-ecs-service--examples--Create_a_service_that_uses_a_task_definition"></a>

The following example template creates a service, a cluster, and a task definition. The cluster contains the service. The service — with a `DesiredCount` of 1 — uses the task definition defined in the template. Replace the `ExecutionRoleArn`, `SecurityGroups`, and `Subnets` with your own information.

#### JSON
<a name="aws-resource-ecs-service--examples--Create_a_service_that_uses_a_task_definition--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "ECSCluster": {
            "Type": "AWS::ECS::Cluster",
            "Properties": {
                "ClusterName": "CFNCluster"
            }
        },
        "ECSTaskDefinition": {
            "Type": "AWS::ECS::TaskDefinition",
            "Properties": {
                "ContainerDefinitions": [
                    {
                        "Command": [
                            "/bin/sh -c \"echo '<html> <head> <title>Amazon ECS Sample App</title> <style>body {margin-top: 40px; background-color: #333;} </style> </head><body> <div style=color:white;text-align:center> <h1>Amazon ECS Sample App</h1> <h2>Congratulations!</h2> <p>Your application is now running on a container in Amazon ECS.</p> </div></body></html>' >  /usr/local/apache2/htdocs/index.html && httpd-foreground\""
                        ],
                        "EntryPoint": [
                            "sh",
                            "-c"
                        ],
                        "Essential": true,
                        "Image": "public.ecr.aws/docker/library/httpd:2.4",
                        "LogConfiguration": {
                            "LogDriver": "awslogs",
                            "Options": {
                                "awslogs-group": "/ecs/fargate-task-definition",
                                "awslogs-region": "us-east-1",
                                "awslogs-stream-prefix": "ecs"
                            }
                        },
                        "Name": "sample-fargate-app",
                        "PortMappings": [
                            {
                                "ContainerPort": 80,
                                "HostPort": 80,
                                "Protocol": "tcp"
                            }
                        ]
                    }
                ],
                "Cpu": 256,
                "ExecutionRoleArn": "arn:aws:iam::111122223333:role/ecsTaskExecutionRole",
                "Family": "task-definition-cfn",
                "Memory": 512,
                "NetworkMode": "awsvpc",
                "RequiresCompatibilities": [
                    "FARGATE"
                ],
                "RuntimePlatform": {
                    "OperatingSystemFamily": "LINUX"
                }
            }
        },
        "ECSService": {
            "Type": "AWS::ECS::Service",
            "Properties": {
                "ServiceName": "cfn-service",
                "Cluster": {
                    "Ref": "ECSCluster"
                },
                "DesiredCount": 1,
                "LaunchType": "FARGATE",
                "NetworkConfiguration": {
                    "AwsvpcConfiguration": {
                        "AssignPublicIp": "ENABLED",
                        "SecurityGroups": [
                            "sg-abcdef01234567890"
                        ],
                        "Subnets": [
                            "subnet-021345abcdef67890"
                        ]
                    }
                },
                "TaskDefinition": {
                    "Ref": "ECSTaskDefinition"
                }
            }
        }
    }
}
```

#### YAML
<a name="aws-resource-ecs-service--examples--Create_a_service_that_uses_a_task_definition--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
  ECSCluster:
    Type: 'AWS::ECS::Cluster'
    Properties:
      ClusterName: CFNCluster
  ECSTaskDefinition:
    Type: 'AWS::ECS::TaskDefinition'
    Properties:
      ContainerDefinitions:
        - Command:
            - >-
              /bin/sh -c "echo '<html> <head> <title>Amazon ECS Sample
              App</title> <style>body {margin-top: 40px; background-color:
              #333;} </style> </head><body> <div
              style=color:white;text-align:center> <h1>Amazon ECS Sample
              App</h1> <h2>Congratulations!</h2> <p>Your application is now
              running on a container in Amazon ECS.</p> </div></body></html>' > 
              /usr/local/apache2/htdocs/index.html && httpd-foreground"
          EntryPoint:
            - sh
            - '-c'
          Essential: true
          Image: 'public.ecr.aws/docker/library/httpd:2.4'
          LogConfiguration:
            LogDriver: awslogs
            Options:
              awslogs-group: /ecs/fargate-task-definition
              awslogs-region: us-east-1
              awslogs-stream-prefix: ecs
          Name: sample-fargate-app
          PortMappings:
            - ContainerPort: 80
              HostPort: 80
              Protocol: tcp
      Cpu: 256
      ExecutionRoleArn: 'arn:aws:iam::111122223333:role/ecsTaskExecutionRole'
      Family: task-definition-cfn
      Memory: 512
      NetworkMode: awsvpc
      RequiresCompatibilities:
        - FARGATE
      RuntimePlatform:
        OperatingSystemFamily: LINUX
  ECSService:
    Type: 'AWS::ECS::Service'
    Properties:
      ServiceName: cfn-service
      Cluster: !Ref ECSCluster
      DesiredCount: 1
      LaunchType: FARGATE
      NetworkConfiguration:
        AwsvpcConfiguration:
          AssignPublicIp: ENABLED
          SecurityGroups:
            - sg-abcdef01234567890
          Subnets:
            - subnet-021345abcdef67890
      TaskDefinition: !Ref ECSTaskDefinition
```

### Create a service with a volume configuration
<a name="aws-resource-ecs-service--examples--Create_a_service_with_a_volume_configuration"></a>

The following example template creates a service that utilizes a pre-existing task that defers volume configuration to service creation. This example template provides volume configuration that Amazon ECS uses to create and attach an Amazon EBS volume to each task in the service. For more information about defering volume configuration and using Amazon EBS volumes with Amazon ECS, see [Use Amazon EBS volumes with Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html) in the *Amazon ECS Developer Guide*. Replace `SubnetIDs`, `SecurityGroupIDs`, `TaskDefinition`, and `ManagedEBSVolume` with your own information. 

#### JSON
<a name="aws-resource-ecs-service--examples--Create_a_service_with_a_volume_configuration--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "The template used to create an ECS Service that includes a volume configuration.",
    "Parameters": {
      "ECSClusterName": {
        "Type": "String",
        "Default": "volume-config-cluster"
      },
      "SecurityGroupIDs": {
        "Type": "CommaDelimitedList",
        "Default": "sg-1234567890abcdef0"
      },
      "SubnetIDs": {
        "Type": "CommaDelimitedList",
        "Default": "subnet-021345abcdef67890,subnet-abcdef01234567890"
      }
    },
    "Resources": {
      "ECSService": {
        "Type": "AWS::ECS::Service",
        "Properties": {
          "Cluster": "endpoint",
          "TaskDefinition": "arn:aws:ecs:us-east-1:111122223333:task-definition/ebs-task-attach-task-def-test:11",
          "LaunchType": "FARGATE",
          "ServiceName": "ebs",
          "SchedulingStrategy": "REPLICA",
          "DesiredCount": 1,
          "NetworkConfiguration": {
            "AwsvpcConfiguration": {
              "AssignPublicIp": "ENABLED",
              "SecurityGroups": {
                "Ref": "SecurityGroupIDs"
              },
              "Subnets": {
                "Ref": "SubnetIDs"
              }
            }
          },
          "PlatformVersion": "LATEST",
          "DeploymentConfiguration": {
            "MaximumPercent": 200,
            "MinimumHealthyPercent": 100,
            "DeploymentCircuitBreaker": {
              "Enable": true,
              "Rollback": true
            }
          },
          "DeploymentController": {
            "Type": "ECS"
          },
          "Tags": [],
          "EnableECSManagedTags": true,
          "VolumeConfigurations": [
            {
              "Name": "ebs-volume",
              "ManagedEBSVolume": {
                "RoleArn": "arn:aws:iam::111122223333:role/ecsInfrastructureRole",
                "VolumeType": "gp3",
                "Iops": "3000",
                "Throughput": "125",
                "SizeInGiB": "10",
                "FilesystemType": "xfs",
                "TagSpecifications": [
                  {
                    "ResourceType": "volume",
                    "PropagateTags": "TASK_DEFINITION"
                  }
                ]
              }
            }
          ]
        }
      }
    },
    "Outputs": {
      "ClusterName": {
        "Description": "The cluster used to create the service.",
        "Value": {
          "Ref": "ECSClusterName"
        }
      },
      "ECSService": {
        "Description": "The created service.",
        "Value": {
          "Ref": "ECSService"
        }
      }
    }
  }
```

#### YAML
<a name="aws-resource-ecs-service--examples--Create_a_service_with_a_volume_configuration--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Description: The template used to create an ECS Service that includes a volume configuration.
Parameters:
  ECSClusterName:
    Type: String
    Default: volume-config-cluster
  SecurityGroupIDs:
    Type: CommaDelimitedList
    Default: sg-1234567890abcdef0
  SubnetIDs:
    Type: CommaDelimitedList
    Default: subnet-021345abcdef67890,subnet-abcdef01234567890
Resources:
  ECSService:
    Type: AWS::ECS::Service
    Properties:
      Cluster: endpoint
      TaskDefinition: arn:aws:ecs:us-east-1:111122223333:task-definition/ebs-task-attach-task-def-test:11
      LaunchType: FARGATE
      ServiceName: ebs
      SchedulingStrategy: REPLICA
      DesiredCount: 1
      NetworkConfiguration:
        AwsvpcConfiguration:
          AssignPublicIp: ENABLED
          SecurityGroups:
            Ref: SecurityGroupIDs
          Subnets:
            Ref: SubnetIDs
      PlatformVersion: LATEST
      DeploymentConfiguration:
        MaximumPercent: 200
        MinimumHealthyPercent: 100
        DeploymentCircuitBreaker:
          Enable: true
          Rollback: true
      DeploymentController:
        Type: ECS
      Tags: []
      EnableECSManagedTags: true
      VolumeConfigurations:
        - Name: ebs-volume
          ManagedEBSVolume:
            RoleArn: arn:aws:iam::111122223333:role/ecsInfrastructureRole
            VolumeType: gp3
            Iops: "3000"
            Throughput: "125"
            SizeInGiB: "10"
            FilesystemType: xfs
            TagSpecifications:
              - ResourceType: volume
                PropagateTags: TASK_DEFINITION
Outputs:
  ClusterName:
    Description: The cluster used to create the service.
    Value:
      Ref: ECSClusterName
  ECSService:
    Description: The created service.
    Value:
      Ref: ECSService
```

### Associate an Application Load Balancer with a service
<a name="aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service"></a>

The following example associates an Application Load Balancer with an Amazon ECS service by referencing an `AWS::ElasticLoadBalancingV2::TargetGroup` resource. Replace the `SecurityGroupIDs`, `SubnetIDs`, `VpcID`, `Cluster`, and `TaskDefinition` with your own information. For more information about using Application Load Balancers with Amazon ECS, see [Use an Application Load Balancer for Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/alb.html) in the *Amazon ECS Developer Guide*.

**Note**  
The Amazon ECS service requires an explicit dependency on the Application Load Balancer listener rule and the Application Load Balancer listener. This prevents the service from starting before the listener is ready.

#### JSON
<a name="aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "The template used to create an ECS Service associated with an Application Load Balancer.",
    "Parameters": {
      "SecurityGroupIDs": {
        "Type": "CommaDelimitedList",
        "Default": "sg-1234567890abcdef0,sg-021345abcdef67890"
      },
      "SubnetIDs": {
        "Type": "CommaDelimitedList",
        "Default": "subnet-abcdef01234567890,subnet-fedcba01234567098,subnet-2135647890abcdef0"
      },
      "VpcID": {
        "Type": "String",
        "Default": "vpc-3214789650abcdef0"
      }
    },
    "Resources": {
        "ECSCluster": {
            "Type": "AWS::ECS::Cluster",
            "Properties": {
                "ClusterName": "ALBCluster"
            }
        },
      "ECSService": {
        "Type": "AWS::ECS::Service",
        "Properties": {
          "Cluster": {"Ref":"ECSCluster"},
          "TaskDefinition": "arn:aws:ecs:us-east-1:111122223333:task-definition/first-run-task:7",
          "LaunchType": "FARGATE",
          "ServiceName": "alb",
          "SchedulingStrategy": "REPLICA",
          "DesiredCount": 3,
          "LoadBalancers": [
            {
              "ContainerName": "first-run-task",
              "ContainerPort": 80,
              "LoadBalancerName": {
                "Ref": "AWS::NoValue"
              },
              "TargetGroupArn": {
                "Ref": "TargetGroup"
              }
            }
          ],
          "HealthCheckGracePeriodSeconds": "20",
          "NetworkConfiguration": {
            "AwsvpcConfiguration": {
              "AssignPublicIp": "ENABLED",
              "SecurityGroups": {
                "Ref": "SecurityGroupIDs"
              },
              "Subnets": {
                "Ref": "SubnetIDs"
              }
            }
          },
          "PlatformVersion": "LATEST",
          "DeploymentConfiguration": {
            "MaximumPercent": 200,
            "MinimumHealthyPercent": 100,
            "DeploymentCircuitBreaker": {
              "Enable": true,
              "Rollback": true
            }
          },
          "DeploymentController": {
            "Type": "ECS"
          },
          "ServiceConnectConfiguration": {
            "Enabled": false
          },
          "Tags": [],
          "EnableECSManagedTags": true
        },
        "DependsOn": [
          "Listener"
        ]
      },
      "LoadBalancer": {
        "Type": "AWS::ElasticLoadBalancingV2::LoadBalancer",
        "Properties": {
          "Type": "application",
          "Name": "alb-test",
          "SecurityGroups": {
            "Ref": "SecurityGroupIDs"
          },
          "Subnets": {
            "Ref": "SubnetIDs"
          }
        }
      },
      "TargetGroup": {
        "Type": "AWS::ElasticLoadBalancingV2::TargetGroup",
        "Properties": {
          "HealthCheckPath": "/",
          "Name": "ecs-task-m-alb",
          "Port": 80,
          "Protocol": "HTTP",
          "TargetType": "ip",
          "HealthCheckProtocol": "HTTP",
          "VpcId": {
            "Ref": "VpcID"
          },
          "TargetGroupAttributes": [
            {
              "Key": "deregistration_delay.timeout_seconds",
              "Value": "300"
            }
          ]
        }
      },
      "Listener": {
        "Type": "AWS::ElasticLoadBalancingV2::Listener",
        "Properties": {
          "DefaultActions": [
            {
              "Type": "forward",
              "TargetGroupArn": {
                "Ref": "TargetGroup"
              }
            }
          ],
          "LoadBalancerArn": {
            "Ref": "LoadBalancer"
          },
          "Port": 80,
          "Protocol": "HTTP"
        }
      }
    },
    "Outputs": {
      "ClusterName": {
        "Description": "The cluster used to create the service.",
        "Value": {
          "Ref": "ECSCluster"
        }
      },
      "ECSService": {
        "Description": "The created service.",
        "Value": {
          "Ref": "ECSService"
        }
      },
      "LoadBalancer": {
        "Description": "The created load balancer.",
        "Value": {
          "Ref": "LoadBalancer"
        }
      },
      "Listener": {
        "Description": "The created listener.",
        "Value": {
          "Ref": "Listener"
        }
      },
      "TargetGroup": {
        "Description": "The created target group.",
        "Value": {
          "Ref": "TargetGroup"
        }
      }
    }
  }
```

#### YAML
<a name="aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Description: The template used to create an ECS Service associated with an
  Application Load Balancer.
Parameters:
  SecurityGroupIDs:
    Type: CommaDelimitedList
    Default: sg-1234567890abcdef0,sg-021345abcdef67890
  SubnetIDs:
    Type: CommaDelimitedList
    Default: subnet-abcdef01234567890,subnet-fedcba01234567098,subnet-2135647890abcdef0
  VpcID:
    Type: String
    Default: vpc-3214789650abcdef0
Resources:
  ECSCluster:
    Type: AWS::ECS::Cluster
    Properties:
      ClusterName: ALBCluster
  ECSService:
    Type: AWS::ECS::Service
    Properties:
      Cluster:
        Ref: ECSCluster
      TaskDefinition: arn:aws:ecs:us-east-1:111122223333:task-definition/first-run-task:7
      LaunchType: FARGATE
      ServiceName: alb
      SchedulingStrategy: REPLICA
      DesiredCount: 3
      LoadBalancers:
        - ContainerName: first-run-task
          ContainerPort: 80
          LoadBalancerName:
            Ref: AWS::NoValue
          TargetGroupArn:
            Ref: TargetGroup
      HealthCheckGracePeriodSeconds: "20"
      NetworkConfiguration:
        AwsvpcConfiguration:
          AssignPublicIp: ENABLED
          SecurityGroups:
            Ref: SecurityGroupIDs
          Subnets:
            Ref: SubnetIDs
      PlatformVersion: LATEST
      DeploymentConfiguration:
        MaximumPercent: 200
        MinimumHealthyPercent: 100
        DeploymentCircuitBreaker:
          Enable: true
          Rollback: true
      DeploymentController:
        Type: ECS
      ServiceConnectConfiguration:
        Enabled: false
      Tags: []
      EnableECSManagedTags: true
    DependsOn:
      - Listener
  LoadBalancer:
    Type: AWS::ElasticLoadBalancingV2::LoadBalancer
    Properties:
      Type: application
      Name: alb-test
      SecurityGroups:
        Ref: SecurityGroupIDs
      Subnets:
        Ref: SubnetIDs
  TargetGroup:
    Type: AWS::ElasticLoadBalancingV2::TargetGroup
    Properties:
      HealthCheckPath: /
      Name: ecs-task-m-alb
      Port: 80
      Protocol: HTTP
      TargetType: ip
      HealthCheckProtocol: HTTP
      VpcId:
        Ref: VpcID
      TargetGroupAttributes:
        - Key: deregistration_delay.timeout_seconds
          Value: "300"
  Listener:
    Type: AWS::ElasticLoadBalancingV2::Listener
    Properties:
      DefaultActions:
        - Type: forward
          TargetGroupArn:
            Ref: TargetGroup
      LoadBalancerArn:
        Ref: LoadBalancer
      Port: 80
      Protocol: HTTP
Outputs:
  ClusterName:
    Description: The cluster used to create the service.
    Value:
      Ref: ECSCluster
  ECSService:
    Description: The created service.
    Value:
      Ref: ECSService
  LoadBalancer:
    Description: The created load balancer.
    Value:
      Ref: LoadBalancer
  Listener:
    Description: The created listener.
    Value:
      Ref: Listener
  TargetGroup:
    Description: The created target group.
    Value:
      Ref: TargetGroup
```

# AWS::ECS::Service AdvancedConfiguration
<a name="aws-properties-ecs-service-advancedconfiguration"></a>

The advanced settings for a load balancer used in blue/green deployments. Specify the alternate target group, listener rules, and IAM role required for traffic shifting during blue/green deployments. For more information, see [Required resources for Amazon ECS blue/green deployments](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/blue-green-deployment-implementation.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-service-advancedconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-advancedconfiguration-syntax.json"></a>

```
{
  "[AlternateTargetGroupArn](#cfn-ecs-service-advancedconfiguration-alternatetargetgrouparn)" : String,
  "[ProductionListenerRule](#cfn-ecs-service-advancedconfiguration-productionlistenerrule)" : String,
  "[RoleArn](#cfn-ecs-service-advancedconfiguration-rolearn)" : String,
  "[TestListenerRule](#cfn-ecs-service-advancedconfiguration-testlistenerrule)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-advancedconfiguration-syntax.yaml"></a>

```
  [AlternateTargetGroupArn](#cfn-ecs-service-advancedconfiguration-alternatetargetgrouparn): String
  [ProductionListenerRule](#cfn-ecs-service-advancedconfiguration-productionlistenerrule): String
  [RoleArn](#cfn-ecs-service-advancedconfiguration-rolearn): String
  [TestListenerRule](#cfn-ecs-service-advancedconfiguration-testlistenerrule): String
```

## Properties
<a name="aws-properties-ecs-service-advancedconfiguration-properties"></a>

`AlternateTargetGroupArn`  <a name="cfn-ecs-service-advancedconfiguration-alternatetargetgrouparn"></a>
The Amazon Resource Name (ARN) of the alternate target group for Amazon ECS blue/green deployments.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ProductionListenerRule`  <a name="cfn-ecs-service-advancedconfiguration-productionlistenerrule"></a>
The Amazon Resource Name (ARN) that that identifies the production listener rule (in the case of an Application Load Balancer) or listener (in the case for an Network Load Balancer) for routing production traffic.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-ecs-service-advancedconfiguration-rolearn"></a>
The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call the Elastic Load Balancing APIs for you.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TestListenerRule`  <a name="cfn-ecs-service-advancedconfiguration-testlistenerrule"></a>
The Amazon Resource Name (ARN) that identifies ) that identifies the test listener rule (in the case of an Application Load Balancer) or listener (in the case for an Network Load Balancer) for routing test traffic.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service AwsVpcConfiguration
<a name="aws-properties-ecs-service-awsvpcconfiguration"></a>

An object representing the networking details for a task or service. For example `awsVpcConfiguration={subnets=["subnet-12344321"],securityGroups=["sg-12344321"]}`.

## Syntax
<a name="aws-properties-ecs-service-awsvpcconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-awsvpcconfiguration-syntax.json"></a>

```
{
  "[AssignPublicIp](#cfn-ecs-service-awsvpcconfiguration-assignpublicip)" : String,
  "[SecurityGroups](#cfn-ecs-service-awsvpcconfiguration-securitygroups)" : [ String, ... ],
  "[Subnets](#cfn-ecs-service-awsvpcconfiguration-subnets)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-ecs-service-awsvpcconfiguration-syntax.yaml"></a>

```
  [AssignPublicIp](#cfn-ecs-service-awsvpcconfiguration-assignpublicip): String
  [SecurityGroups](#cfn-ecs-service-awsvpcconfiguration-securitygroups): 
    - String
  [Subnets](#cfn-ecs-service-awsvpcconfiguration-subnets): 
    - String
```

## Properties
<a name="aws-properties-ecs-service-awsvpcconfiguration-properties"></a>

`AssignPublicIp`  <a name="cfn-ecs-service-awsvpcconfiguration-assignpublicip"></a>
Whether the task's elastic network interface receives a public IP address.   
Consider the following when you set this value:  
+ When you use `create-service` or `update-service`, the default is `DISABLED`. 
+ When the service `deploymentController` is `ECS`, the value must be `DISABLED`. 
*Required*: No  
*Type*: String  
*Allowed values*: `DISABLED | ENABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecurityGroups`  <a name="cfn-ecs-service-awsvpcconfiguration-securitygroups"></a>
The IDs of the security groups associated with the task or service. If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified.  
All specified security groups must be from the same VPC.
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Subnets`  <a name="cfn-ecs-service-awsvpcconfiguration-subnets"></a>
The IDs of the subnets associated with the task or service. There's a limit of 16 subnets that can be specified.  
All specified subnets must be from the same VPC.
*Required*: No  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-awsvpcconfiguration--seealso"></a>
+  [Creating a cluster capacity provider association using an Auto Scaling group capacity provider](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-clustercapacityproviderassociations.html#aws-resource-ecs-clustercapacityproviderassociations--examples--Creating_a_cluster_capacity_provider_association_using_an_Auto_Scaling_group_capacity_provider.) 

# AWS::ECS::Service CanaryConfiguration
<a name="aws-properties-ecs-service-canaryconfiguration"></a>

Configuration for a canary deployment strategy that shifts a fixed percentage of traffic to the new service revision, waits for a specified bake time, then shifts the remaining traffic. 

The following validation applies only to Canary deployments created through CloudFormation. CloudFormation operations time out after 36 hours. Canary deployments can approach this limit because of their extended duration. This can cause CloudFormation to roll back the deployment. To prevent timeout-related rollbacks, CloudFormation rejects deployments when the calculated deployment time exceeds 33 hours based on your template configuration: 

 `BakeTimeInMinutes + CanaryBakeTimeInMinutes` 

Additional backend processes (such as task scaling and running lifecycle hooks) can extend deployment time beyond these calculations. Even deployments under the 33-hour threshold might still time out if these processes cause the total duration to exceed 36 hours. 

## Syntax
<a name="aws-properties-ecs-service-canaryconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-canaryconfiguration-syntax.json"></a>

```
{
  "[CanaryBakeTimeInMinutes](#cfn-ecs-service-canaryconfiguration-canarybaketimeinminutes)" : Integer,
  "[CanaryPercent](#cfn-ecs-service-canaryconfiguration-canarypercent)" : Number
}
```

### YAML
<a name="aws-properties-ecs-service-canaryconfiguration-syntax.yaml"></a>

```
  [CanaryBakeTimeInMinutes](#cfn-ecs-service-canaryconfiguration-canarybaketimeinminutes): Integer
  [CanaryPercent](#cfn-ecs-service-canaryconfiguration-canarypercent): Number
```

## Properties
<a name="aws-properties-ecs-service-canaryconfiguration-properties"></a>

`CanaryBakeTimeInMinutes`  <a name="cfn-ecs-service-canaryconfiguration-canarybaketimeinminutes"></a>
The amount of time in minutes to wait during the canary phase before shifting the remaining production traffic to the new service revision. Valid values are 0 to 1440 minutes (24 hours). The default value is 10.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `1440`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CanaryPercent`  <a name="cfn-ecs-service-canaryconfiguration-canarypercent"></a>
The percentage of production traffic to shift to the new service revision during the canary phase. Valid values are multiples of 0.1 from 0.1 to 100.0. The default value is 5.0.  
*Required*: No  
*Type*: Number  
*Minimum*: `0`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service CapacityProviderStrategyItem
<a name="aws-properties-ecs-service-capacityproviderstrategyitem"></a>

The details of a capacity provider strategy. A capacity provider strategy can be set when using the `RunTask` or `CreateService` APIs or as the default capacity provider strategy for a cluster with the `CreateCluster` API.

Only capacity providers that are already associated with a cluster and have an `ACTIVE` or `UPDATING` status can be used in a capacity provider strategy. The `PutClusterCapacityProviders` API is used to associate a capacity provider with a cluster.

If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New Auto Scaling group capacity providers can be created with the `CreateCapacityProvider` API operation.

To use an AWS Fargate capacity provider, specify either the `FARGATE` or `FARGATE_SPOT` capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used in a capacity provider strategy.

## Syntax
<a name="aws-properties-ecs-service-capacityproviderstrategyitem-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-capacityproviderstrategyitem-syntax.json"></a>

```
{
  "[Base](#cfn-ecs-service-capacityproviderstrategyitem-base)" : Integer,
  "[CapacityProvider](#cfn-ecs-service-capacityproviderstrategyitem-capacityprovider)" : String,
  "[Weight](#cfn-ecs-service-capacityproviderstrategyitem-weight)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-service-capacityproviderstrategyitem-syntax.yaml"></a>

```
  [Base](#cfn-ecs-service-capacityproviderstrategyitem-base): Integer
  [CapacityProvider](#cfn-ecs-service-capacityproviderstrategyitem-capacityprovider): String
  [Weight](#cfn-ecs-service-capacityproviderstrategyitem-weight): Integer
```

## Properties
<a name="aws-properties-ecs-service-capacityproviderstrategyitem-properties"></a>

`Base`  <a name="cfn-ecs-service-capacityproviderstrategyitem-base"></a>
The *base* value designates how many tasks, at a minimum, to run on the specified capacity provider for each service. Only one capacity provider in a capacity provider strategy can have a *base* defined. If no value is specified, the default value of `0` is used.  
Base value characteristics:  
+ Only one capacity provider in a strategy can have a base defined
+ The default value is `0` if not specified
+ The valid range is 0 to 100,000
+ Base requirements are satisfied first before weight distribution
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `100000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CapacityProvider`  <a name="cfn-ecs-service-capacityproviderstrategyitem-capacityprovider"></a>
The short name of the capacity provider. This can be either an AWS managed capacity provider (`FARGATE` or `FARGATE_SPOT`) or the name of a custom capacity provider that you created.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Weight`  <a name="cfn-ecs-service-capacityproviderstrategyitem-weight"></a>
The *weight* value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The `weight` value is taken into consideration after the `base` value, if defined, is satisfied.  
If no `weight` value is specified, the default value of `0` is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of `0` can't be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of `0`, any `RunTask` or `CreateService` actions using the capacity provider strategy will fail.  
Weight value characteristics:  
+ Weight is considered after the base value is satisfied
+ The default value is `0` if not specified
+ The valid range is 0 to 1,000
+ At least one capacity provider must have a weight greater than zero
+ Capacity providers with weight of `0` cannot place tasks
Task distribution logic:  

1. Base satisfaction: The minimum number of tasks specified by the base value are placed on that capacity provider

1. Weight distribution: After base requirements are met, additional tasks are distributed according to weight ratios
Examples:  
Equal Distribution: Two capacity providers both with weight `1` will split tasks evenly after base requirements are met.  
Weighted Distribution: If capacityProviderA has weight `1` and capacityProviderB has weight `4`, then for every 1 task on A, 4 tasks will run on B.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `1000`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-capacityproviderstrategyitem--seealso"></a>
+  [Creating a cluster capacity provider association using an Auto Scaling group capacity provider](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-clustercapacityproviderassociations.html#aws-resource-ecs-clustercapacityproviderassociations--examples--Creating_a_cluster_capacity_provider_association_using_an_Auto_Scaling_group_capacity_provider.) 

# AWS::ECS::Service DeploymentAlarms
<a name="aws-properties-ecs-service-deploymentalarms"></a>

One of the methods which provide a way for you to quickly identify when a deployment has failed, and then to optionally roll back the failure to the last working deployment.

When the alarms are generated, Amazon ECS sets the service deployment to failed. Set the rollback parameter to have Amazon ECS to roll back your service to the last completed deployment after a failure.

You can only use the `DeploymentAlarms` method to detect failures when the `DeploymentController` is set to `ECS`.

For more information, see [Rolling update](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html) in the * *Amazon Elastic Container Service Developer Guide* *.

## Syntax
<a name="aws-properties-ecs-service-deploymentalarms-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-deploymentalarms-syntax.json"></a>

```
{
  "[AlarmNames](#cfn-ecs-service-deploymentalarms-alarmnames)" : [ String, ... ],
  "[Enable](#cfn-ecs-service-deploymentalarms-enable)" : Boolean,
  "[Rollback](#cfn-ecs-service-deploymentalarms-rollback)" : Boolean
}
```

### YAML
<a name="aws-properties-ecs-service-deploymentalarms-syntax.yaml"></a>

```
  [AlarmNames](#cfn-ecs-service-deploymentalarms-alarmnames): 
    - String
  [Enable](#cfn-ecs-service-deploymentalarms-enable): Boolean
  [Rollback](#cfn-ecs-service-deploymentalarms-rollback): Boolean
```

## Properties
<a name="aws-properties-ecs-service-deploymentalarms-properties"></a>

`AlarmNames`  <a name="cfn-ecs-service-deploymentalarms-alarmnames"></a>
One or more CloudWatch alarm names. Use a "," to separate the alarms.  
*Required*: Yes  
*Type*: Array of String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Enable`  <a name="cfn-ecs-service-deploymentalarms-enable"></a>
Determines whether to use the CloudWatch alarm option in the service deployment process.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Rollback`  <a name="cfn-ecs-service-deploymentalarms-rollback"></a>
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is used, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-deploymentalarms--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service DeploymentCircuitBreaker
<a name="aws-properties-ecs-service-deploymentcircuitbreaker"></a>

**Note**  
The deployment circuit breaker can only be used for services using the rolling update (`ECS`) deployment type.

The **deployment circuit breaker** determines whether a service deployment will fail if the service can't reach a steady state. If it is turned on, a service deployment will transition to a failed state and stop launching new tasks. You can also configure Amazon ECS to roll back your service to the last completed deployment after a failure. For more information, see [Rolling update](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html) in the *Amazon Elastic Container Service Developer Guide*.

For more information about API failure reasons, see [API failure reasons](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/api_failures_messages.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-service-deploymentcircuitbreaker-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-deploymentcircuitbreaker-syntax.json"></a>

```
{
  "[Enable](#cfn-ecs-service-deploymentcircuitbreaker-enable)" : Boolean,
  "[Rollback](#cfn-ecs-service-deploymentcircuitbreaker-rollback)" : Boolean
}
```

### YAML
<a name="aws-properties-ecs-service-deploymentcircuitbreaker-syntax.yaml"></a>

```
  [Enable](#cfn-ecs-service-deploymentcircuitbreaker-enable): Boolean
  [Rollback](#cfn-ecs-service-deploymentcircuitbreaker-rollback): Boolean
```

## Properties
<a name="aws-properties-ecs-service-deploymentcircuitbreaker-properties"></a>

`Enable`  <a name="cfn-ecs-service-deploymentcircuitbreaker-enable"></a>
Determines whether to use the deployment circuit breaker logic for the service.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Rollback`  <a name="cfn-ecs-service-deploymentcircuitbreaker-rollback"></a>
Determines whether to configure Amazon ECS to roll back the service if a service deployment fails. If rollback is on, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-deploymentcircuitbreaker--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service DeploymentConfiguration
<a name="aws-properties-ecs-service-deploymentconfiguration"></a>

Optional deployment parameters that control how many tasks run during a deployment and the ordering of stopping and starting tasks.

## Syntax
<a name="aws-properties-ecs-service-deploymentconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-deploymentconfiguration-syntax.json"></a>

```
{
  "[Alarms](#cfn-ecs-service-deploymentconfiguration-alarms)" : DeploymentAlarms,
  "[BakeTimeInMinutes](#cfn-ecs-service-deploymentconfiguration-baketimeinminutes)" : Integer,
  "[CanaryConfiguration](#cfn-ecs-service-deploymentconfiguration-canaryconfiguration)" : CanaryConfiguration,
  "[DeploymentCircuitBreaker](#cfn-ecs-service-deploymentconfiguration-deploymentcircuitbreaker)" : DeploymentCircuitBreaker,
  "[LifecycleHooks](#cfn-ecs-service-deploymentconfiguration-lifecyclehooks)" : [ DeploymentLifecycleHook, ... ],
  "[LinearConfiguration](#cfn-ecs-service-deploymentconfiguration-linearconfiguration)" : LinearConfiguration,
  "[MaximumPercent](#cfn-ecs-service-deploymentconfiguration-maximumpercent)" : Integer,
  "[MinimumHealthyPercent](#cfn-ecs-service-deploymentconfiguration-minimumhealthypercent)" : Integer,
  "[Strategy](#cfn-ecs-service-deploymentconfiguration-strategy)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-deploymentconfiguration-syntax.yaml"></a>

```
  [Alarms](#cfn-ecs-service-deploymentconfiguration-alarms): 
    DeploymentAlarms
  [BakeTimeInMinutes](#cfn-ecs-service-deploymentconfiguration-baketimeinminutes): Integer
  [CanaryConfiguration](#cfn-ecs-service-deploymentconfiguration-canaryconfiguration): 
    CanaryConfiguration
  [DeploymentCircuitBreaker](#cfn-ecs-service-deploymentconfiguration-deploymentcircuitbreaker): 
    DeploymentCircuitBreaker
  [LifecycleHooks](#cfn-ecs-service-deploymentconfiguration-lifecyclehooks): 
    - DeploymentLifecycleHook
  [LinearConfiguration](#cfn-ecs-service-deploymentconfiguration-linearconfiguration): 
    LinearConfiguration
  [MaximumPercent](#cfn-ecs-service-deploymentconfiguration-maximumpercent): Integer
  [MinimumHealthyPercent](#cfn-ecs-service-deploymentconfiguration-minimumhealthypercent): Integer
  [Strategy](#cfn-ecs-service-deploymentconfiguration-strategy): String
```

## Properties
<a name="aws-properties-ecs-service-deploymentconfiguration-properties"></a>

`Alarms`  <a name="cfn-ecs-service-deploymentconfiguration-alarms"></a>
Information about the CloudWatch alarms.  
*Required*: No  
*Type*: [DeploymentAlarms](aws-properties-ecs-service-deploymentalarms.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`BakeTimeInMinutes`  <a name="cfn-ecs-service-deploymentconfiguration-baketimeinminutes"></a>
The duration waiting before terminating the previous service revision and marking a deployment complete.  
The following rules apply when you don't specify a value:  
+ For blue/green, linear, and canary deployments, the value is set to 15 minutes.
+ For rolling deployments, there is no bake time set by default.
+ The external deployment controller (`EXTERNAL`) and the CodeDeploy blue/green deployment controller (`CODE_DEPLOY`) do not support the `BakeTimeInMinutes` parameter.
If you provide a bake time for a rolling deployment, the CloudFormation handler timeout is increased to the maximum of 36 hours, matching the timeout for blue/green, linear, and canary deployments.
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `1440`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`CanaryConfiguration`  <a name="cfn-ecs-service-deploymentconfiguration-canaryconfiguration"></a>
Configuration for canary deployment strategy. Only valid when the deployment strategy is `CANARY`. This configuration enables shifting a fixed percentage of traffic for testing, followed by shifting the remaining traffic after a bake period.  
*Required*: No  
*Type*: [CanaryConfiguration](aws-properties-ecs-service-canaryconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DeploymentCircuitBreaker`  <a name="cfn-ecs-service-deploymentconfiguration-deploymentcircuitbreaker"></a>
The deployment circuit breaker can only be used for services using the rolling update (`ECS`) deployment type.
The **deployment circuit breaker** determines whether a service deployment will fail if the service can't reach a steady state. If you use the deployment circuit breaker, a service deployment will transition to a failed state and stop launching new tasks. If you use the rollback option, when a service deployment fails, the service is rolled back to the last deployment that completed successfully. For more information, see [Rolling update](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html) in the *Amazon Elastic Container Service Developer Guide*  
*Required*: No  
*Type*: [DeploymentCircuitBreaker](aws-properties-ecs-service-deploymentcircuitbreaker.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LifecycleHooks`  <a name="cfn-ecs-service-deploymentconfiguration-lifecyclehooks"></a>
An array of deployment lifecycle hook objects to run custom logic at specific stages of the deployment lifecycle.  
*Required*: No  
*Type*: Array of [DeploymentLifecycleHook](aws-properties-ecs-service-deploymentlifecyclehook.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LinearConfiguration`  <a name="cfn-ecs-service-deploymentconfiguration-linearconfiguration"></a>
Configuration for linear deployment strategy. Only valid when the deployment strategy is `LINEAR`. This configuration enables progressive traffic shifting in equal percentage increments with configurable bake times between each step.  
*Required*: No  
*Type*: [LinearConfiguration](aws-properties-ecs-service-linearconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MaximumPercent`  <a name="cfn-ecs-service-deploymentconfiguration-maximumpercent"></a>
If a service is using the rolling update (`ECS`) deployment type, the `maximumPercent` parameter represents an upper limit on the number of your service's tasks that are allowed in the `RUNNING` or `PENDING` state during a deployment, as a percentage of the `desiredCount` (rounded down to the nearest integer). This parameter enables you to define the deployment batch size. For example, if your service is using the `REPLICA` service scheduler and has a `desiredCount` of four tasks and a `maximumPercent` value of 200%, the scheduler may start four new tasks before stopping the four older tasks (provided that the cluster resources required to do this are available). The default `maximumPercent` value for a service using the `REPLICA` service scheduler is 200%.  
The Amazon ECS scheduler uses this parameter to replace unhealthy tasks by starting replacement tasks first and then stopping the unhealthy tasks, as long as cluster resources for starting replacement tasks are available. For more information about how the scheduler replaces unhealthy tasks, see [Amazon ECS services](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html).  
If a service is using either the blue/green (`CODE_DEPLOY`) or `EXTERNAL` deployment types, and tasks in the service use the EC2 launch type, the **maximum percent** value is set to the default value. The **maximum percent** value is used to define the upper limit on the number of the tasks in the service that remain in the `RUNNING` state while the container instances are in the `DRAINING` state.  
You can't specify a custom `maximumPercent` value for a service that uses either the blue/green (`CODE_DEPLOY`) or `EXTERNAL` deployment types and has tasks that use the EC2 launch type.
If the service uses either the blue/green (`CODE_DEPLOY`) or `EXTERNAL` deployment types, and the tasks in the service use the Fargate launch type, the maximum percent value is not used. The value is still returned when describing your service.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`MinimumHealthyPercent`  <a name="cfn-ecs-service-deploymentconfiguration-minimumhealthypercent"></a>
If a service is using the rolling update (`ECS`) deployment type, the `minimumHealthyPercent` represents a lower limit on the number of your service's tasks that must remain in the `RUNNING` state during a deployment, as a percentage of the `desiredCount` (rounded up to the nearest integer). This parameter enables you to deploy without using additional cluster capacity. For example, if your service has a `desiredCount` of four tasks and a `minimumHealthyPercent` of 50%, the service scheduler may stop two existing tasks to free up cluster capacity before starting two new tasks.   
 If any tasks are unhealthy and if `maximumPercent` doesn't allow the Amazon ECS scheduler to start replacement tasks, the scheduler stops the unhealthy tasks one-by-one — using the `minimumHealthyPercent` as a constraint — to clear up capacity to launch replacement tasks. For more information about how the scheduler replaces unhealthy tasks, see [Amazon ECS services](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html).   
For services that *do not* use a load balancer, the following should be noted:  
+ A service is considered healthy if all essential containers within the tasks in the service pass their health checks.
+ If a task has no essential containers with a health check defined, the service scheduler will wait for 40 seconds after a task reaches a `RUNNING` state before the task is counted towards the minimum healthy percent total.
+ If a task has one or more essential containers with a health check defined, the service scheduler will wait for the task to reach a healthy status before counting it towards the minimum healthy percent total. A task is considered healthy when all essential containers within the task have passed their health checks. The amount of time the service scheduler can wait for is determined by the container health check settings. 
For services that *do* use a load balancer, the following should be noted:  
+ If a task has no essential containers with a health check defined, the service scheduler will wait for the load balancer target group health check to return a healthy status before counting the task towards the minimum healthy percent total.
+ If a task has an essential container with a health check defined, the service scheduler will wait for both the task to reach a healthy status and the load balancer target group health check to return a healthy status before counting the task towards the minimum healthy percent total.
The default value for a replica service for `minimumHealthyPercent` is 100%. The default `minimumHealthyPercent` value for a service using the `DAEMON` service schedule is 0% for the AWS CLI, the AWS SDKs, and the APIs and 50% for the AWS Management Console.  
The minimum number of healthy tasks during a deployment is the `desiredCount` multiplied by the `minimumHealthyPercent`/100, rounded up to the nearest integer value.  
If a service is using either the blue/green (`CODE_DEPLOY`) or `EXTERNAL` deployment types and is running tasks that use the EC2 launch type, the **minimum healthy percent** value is set to the default value. The **minimum healthy percent** value is used to define the lower limit on the number of the tasks in the service that remain in the `RUNNING` state while the container instances are in the `DRAINING` state.  
You can't specify a custom `minimumHealthyPercent` value for a service that uses either the blue/green (`CODE_DEPLOY`) or `EXTERNAL` deployment types and has tasks that use the EC2 launch type.
If a service is using either the blue/green (`CODE_DEPLOY`) or `EXTERNAL` deployment types and is running tasks that use the Fargate launch type, the minimum healthy percent value is not used, although it is returned when describing your service.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Strategy`  <a name="cfn-ecs-service-deploymentconfiguration-strategy"></a>
The deployment strategy for the service. Choose from these valid values:  
+ `ROLLING` - When you create a service which uses the rolling update (`ROLLING`) deployment strategy, the Amazon ECS service scheduler replaces the currently running tasks with new tasks. The number of tasks that Amazon ECS adds or removes from the service during a rolling update is controlled by the service deployment configuration.
+ `BLUE_GREEN` - A blue/green deployment strategy (`BLUE_GREEN`) is a release methodology that reduces downtime and risk by running two identical production environments called blue and green. With Amazon ECS blue/green deployments, you can validate new service revisions before directing production traffic to them. This approach provides a safer way to deploy changes with the ability to quickly roll back if needed.
+ `LINEAR` - A *linear* deployment strategy (`LINEAR`) gradually shifts traffic from the current production environment to a new environment in equal percentages over time. With Amazon ECS linear deployments, you can control the pace of traffic shifting and validate new service revisions with increasing amounts of production traffic.
+ `CANARY` - A *canary* deployment strategy (`CANARY`) shifts a small percentage of traffic to the new service revision first, then shifts the remaining traffic all at once after a specified time period. This allows you to test the new version with a subset of users before full deployment.
*Required*: No  
*Type*: String  
*Allowed values*: `ROLLING | BLUE_GREEN | LINEAR | CANARY`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-deploymentconfiguration--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service DeploymentController
<a name="aws-properties-ecs-service-deploymentcontroller"></a>

The deployment controller to use for the service. 

## Syntax
<a name="aws-properties-ecs-service-deploymentcontroller-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-deploymentcontroller-syntax.json"></a>

```
{
  "[Type](#cfn-ecs-service-deploymentcontroller-type)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-deploymentcontroller-syntax.yaml"></a>

```
  [Type](#cfn-ecs-service-deploymentcontroller-type): String
```

## Properties
<a name="aws-properties-ecs-service-deploymentcontroller-properties"></a>

`Type`  <a name="cfn-ecs-service-deploymentcontroller-type"></a>
The deployment controller type to use.  
The deployment controller is the mechanism that determines how tasks are deployed for your service. The valid options are:  
+ ECS

  When you create a service which uses the `ECS` deployment controller, you can choose between the following deployment strategies:
  + `ROLLING`: When you create a service which uses the *rolling update* (`ROLLING`) deployment strategy, the Amazon ECS service scheduler replaces the currently running tasks with new tasks. The number of tasks that Amazon ECS adds or removes from the service during a rolling update is controlled by the service deployment configuration. 

    Rolling update deployments are best suited for the following scenarios:
    + Gradual service updates: You need to update your service incrementally without taking the entire service offline at once.
    + Limited resource requirements: You want to avoid the additional resource costs of running two complete environments simultaneously (as required by blue/green deployments).
    + Acceptable deployment time: Your application can tolerate a longer deployment process, as rolling updates replace tasks one by one.
    + No need for instant roll back: Your service can tolerate a rollback process that takes minutes rather than seconds.
    + Simple deployment process: You prefer a straightforward deployment approach without the complexity of managing multiple environments, target groups, and listeners.
    + No load balancer requirement: Your service doesn't use or require a load balancer, Application Load Balancer, Network Load Balancer, or Service Connect (which are required for blue/green deployments).
    + Stateful applications: Your application maintains state that makes it difficult to run two parallel environments.
    + Cost sensitivity: You want to minimize deployment costs by not running duplicate environments during deployment.

    Rolling updates are the default deployment strategy for services and provide a balance between deployment safety and resource efficiency for many common application scenarios.
  + `BLUE_GREEN`: A *blue/green* deployment strategy (`BLUE_GREEN`) is a release methodology that reduces downtime and risk by running two identical production environments called blue and green. With Amazon ECS blue/green deployments, you can validate new service revisions before directing production traffic to them. This approach provides a safer way to deploy changes with the ability to quickly roll back if needed.

    Amazon ECS blue/green deployments are best suited for the following scenarios:
    + Service validation: When you need to validate new service revisions before directing production traffic to them
    + Zero downtime: When your service requires zero-downtime deployments
    + Instant roll back: When you need the ability to quickly roll back if issues are detected
    + Load balancer requirement: When your service uses Application Load Balancer, Network Load Balancer, or Service Connect
+ External

  Use a third-party deployment controller.
+ Blue/green deployment (powered by CodeDeploy)

  CodeDeploy installs an updated version of the application as a new replacement task set and reroutes production traffic from the original application task set to the replacement task set. The original task set is terminated after a successful deployment. Use this deployment controller to verify a new deployment of a service before sending production traffic to it.
When updating the deployment controller for a service, consider the following depending on the type of migration you're performing.  
+ If you have a template that contains the `EXTERNAL` deployment controller information as well as `TaskSet` and `PrimaryTaskSet` resources, and you remove the task set resources from the template when updating from `EXTERNAL` to `ECS`, the `DescribeTaskSet` and `DeleteTaskSet` API calls will return a 400 error after the deployment controller is updated to `ECS`. This results in a delete failure on the task set resources, even though the stack transitions to `UPDATE_COMPLETE` status. For more information, see [Resource removed from stack but not deleted](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/troubleshooting.html#troubleshooting-errors-resource-removed-not-deleted) in the AWS CloudFormation User Guide. To fix this issue, delete the task sets directly using the Amazon ECS`DeleteTaskSet` API. For more information about how to delete a task set, see [DeleteTaskSet](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeleteTaskSet.html) in the Amazon Elastic Container Service API Reference.
+ If you're migrating from `CODE_DEPLOY` to `ECS` with a new task definition and CloudFormation performs a rollback operation, the Amazon ECS`UpdateService` request fails with the following error:

  Resource handler returned message: "Invalid request provided: Unable to update task definition on services with a CODE\$1DEPLOY deployment controller. 
+ After a successful migration from `ECS` to `EXTERNAL` deployment controller, you need to manually remove the `ACTIVE` task set, because Amazon ECS no longer manages the deployment. For information about how to delete a task set, see [DeleteTaskSet](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DeleteTaskSet.html) in the Amazon Elastic Container Service API Reference.
*Required*: No  
*Type*: String  
*Allowed values*: `CODE_DEPLOY | ECS | EXTERNAL`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service DeploymentLifecycleHook
<a name="aws-properties-ecs-service-deploymentlifecyclehook"></a>

A deployment lifecycle hook runs custom logic at specific stages of the deployment process. Currently, you can use Lambda functions as hook targets.

For more information, see [Lifecycle hooks for Amazon ECS service deployments](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-lifecycle-hooks.html) in the * Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-service-deploymentlifecyclehook-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-deploymentlifecyclehook-syntax.json"></a>

```
{
  "[HookDetails](#cfn-ecs-service-deploymentlifecyclehook-hookdetails)" : Json,
  "[HookTargetArn](#cfn-ecs-service-deploymentlifecyclehook-hooktargetarn)" : String,
  "[LifecycleStages](#cfn-ecs-service-deploymentlifecyclehook-lifecyclestages)" : [ String, ... ],
  "[RoleArn](#cfn-ecs-service-deploymentlifecyclehook-rolearn)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-deploymentlifecyclehook-syntax.yaml"></a>

```
  [HookDetails](#cfn-ecs-service-deploymentlifecyclehook-hookdetails): Json
  [HookTargetArn](#cfn-ecs-service-deploymentlifecyclehook-hooktargetarn): String
  [LifecycleStages](#cfn-ecs-service-deploymentlifecyclehook-lifecyclestages): 
    - String
  [RoleArn](#cfn-ecs-service-deploymentlifecyclehook-rolearn): String
```

## Properties
<a name="aws-properties-ecs-service-deploymentlifecyclehook-properties"></a>

`HookDetails`  <a name="cfn-ecs-service-deploymentlifecyclehook-hookdetails"></a>
 Use this field to specify custom parameters that Amazon ECS passes to your hook target invocations (such as a Lambda function).  
This field must be a JSON object as a string.  
*Required*: No  
*Type*: Json  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`HookTargetArn`  <a name="cfn-ecs-service-deploymentlifecyclehook-hooktargetarn"></a>
The Amazon Resource Name (ARN) of the hook target. Currently, only Lambda function ARNs are supported.  
You must provide this parameter when configuring a deployment lifecycle hook.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LifecycleStages`  <a name="cfn-ecs-service-deploymentlifecyclehook-lifecyclestages"></a>
The lifecycle stages at which to run the hook. Choose from these valid values:  
+ RECONCILE\$1SERVICE

  The reconciliation stage that only happens when you start a new service deployment with more than 1 service revision in an ACTIVE state.

  You can use a lifecycle hook for this stage.
+ PRE\$1SCALE\$1UP

  The green service revision has not started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

  You can use a lifecycle hook for this stage.
+ POST\$1SCALE\$1UP

  The green service revision has started. The blue service revision is handling 100% of the production traffic. There is no test traffic.

  You can use a lifecycle hook for this stage.
+ TEST\$1TRAFFIC\$1SHIFT

  The blue and green service revisions are running. The blue service revision handles 100% of the production traffic. The green service revision is migrating from 0% to 100% of test traffic.

  You can use a lifecycle hook for this stage.
+ POST\$1TEST\$1TRAFFIC\$1SHIFT

  The test traffic shift is complete. The green service revision handles 100% of the test traffic.

  You can use a lifecycle hook for this stage.
+ PRODUCTION\$1TRAFFIC\$1SHIFT

  Production traffic is shifting to the green service revision. The green service revision is migrating from 0% to 100% of production traffic.

  You can use a lifecycle hook for this stage.
+ POST\$1PRODUCTION\$1TRAFFIC\$1SHIFT

  The production traffic shift is complete.

  You can use a lifecycle hook for this stage.
You must provide this parameter when configuring a deployment lifecycle hook.  
*Required*: Yes  
*Type*: Array of String  
*Allowed values*: `RECONCILE_SERVICE | PRE_SCALE_UP | POST_SCALE_UP | TEST_TRAFFIC_SHIFT | POST_TEST_TRAFFIC_SHIFT | PRODUCTION_TRAFFIC_SHIFT | POST_PRODUCTION_TRAFFIC_SHIFT`  
*Minimum*: `1`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-ecs-service-deploymentlifecyclehook-rolearn"></a>
The Amazon Resource Name (ARN) of the IAM role that grants Amazon ECS permission to call Lambda functions on your behalf.  
For more information, see [Permissions required for Lambda functions in Amazon ECS blue/green deployments](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/blue-green-permissions.html) in the * Amazon Elastic Container Service Developer Guide*.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service EBSTagSpecification
<a name="aws-properties-ecs-service-ebstagspecification"></a>

The tag specifications of an Amazon EBS volume.

## Syntax
<a name="aws-properties-ecs-service-ebstagspecification-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-ebstagspecification-syntax.json"></a>

```
{
  "[PropagateTags](#cfn-ecs-service-ebstagspecification-propagatetags)" : String,
  "[ResourceType](#cfn-ecs-service-ebstagspecification-resourcetype)" : String,
  "[Tags](#cfn-ecs-service-ebstagspecification-tags)" : [ Tag, ... ]
}
```

### YAML
<a name="aws-properties-ecs-service-ebstagspecification-syntax.yaml"></a>

```
  [PropagateTags](#cfn-ecs-service-ebstagspecification-propagatetags): String
  [ResourceType](#cfn-ecs-service-ebstagspecification-resourcetype): String
  [Tags](#cfn-ecs-service-ebstagspecification-tags): 
    - Tag
```

## Properties
<a name="aws-properties-ecs-service-ebstagspecification-properties"></a>

`PropagateTags`  <a name="cfn-ecs-service-ebstagspecification-propagatetags"></a>
Determines whether to propagate the tags from the task definition to the Amazon EBS volume. Tags can only propagate to a `SERVICE` specified in `ServiceVolumeConfiguration`. If no value is specified, the tags aren't propagated.  
*Required*: No  
*Type*: String  
*Allowed values*: `SERVICE | TASK_DEFINITION`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ResourceType`  <a name="cfn-ecs-service-ebstagspecification-resourcetype"></a>
The type of volume resource.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `volume`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tags`  <a name="cfn-ecs-service-ebstagspecification-tags"></a>
The tags applied to this Amazon EBS volume. `AmazonECSCreated` and `AmazonECSManaged` are reserved tags that can't be used.  
*Required*: No  
*Type*: Array of [Tag](aws-properties-ecs-service-tag.md)  
*Minimum*: `0`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service ForceNewDeployment
<a name="aws-properties-ecs-service-forcenewdeployment"></a>

Determines whether to force a new deployment of the service. By default, deployments aren't forced. You can use this option to start a new deployment with no service definition changes. For example, you can update a service's tasks to use a newer Docker image with the same image/tag combination (`my_image:latest`) or to roll Fargate tasks onto a newer platform version.

## Syntax
<a name="aws-properties-ecs-service-forcenewdeployment-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-forcenewdeployment-syntax.json"></a>

```
{
  "[EnableForceNewDeployment](#cfn-ecs-service-forcenewdeployment-enableforcenewdeployment)" : Boolean,
  "[ForceNewDeploymentNonce](#cfn-ecs-service-forcenewdeployment-forcenewdeploymentnonce)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-forcenewdeployment-syntax.yaml"></a>

```
  [EnableForceNewDeployment](#cfn-ecs-service-forcenewdeployment-enableforcenewdeployment): Boolean
  [ForceNewDeploymentNonce](#cfn-ecs-service-forcenewdeployment-forcenewdeploymentnonce): String
```

## Properties
<a name="aws-properties-ecs-service-forcenewdeployment-properties"></a>

`EnableForceNewDeployment`  <a name="cfn-ecs-service-forcenewdeployment-enableforcenewdeployment"></a>
Determines whether to force a new deployment of the service. By default, deployments aren't forced. You can use this option to start a new deployment with no service definition changes. For example, you can update a service's tasks to use a newer Docker image with the same image/tag combination (`my_image:latest`) or to roll Fargate tasks onto a newer platform version.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ForceNewDeploymentNonce`  <a name="cfn-ecs-service-forcenewdeployment-forcenewdeploymentnonce"></a>
When you change the` ForceNewDeploymentNonce` value in your template, it signals Amazon ECS to start a new deployment even though no other service parameters have changed. The value must be a unique, time- varying value like a timestamp, random string, or sequence number. Use this property when you want to ensure your tasks pick up the latest version of a Docker image that uses the same tag but has been updated in the registry.   
*Required*: No  
*Type*: String  
*Minimum*: `1`  
*Maximum*: `255`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service LinearConfiguration
<a name="aws-properties-ecs-service-linearconfiguration"></a>

Configuration for a linear deployment strategy that shifts production traffic in equal percentage increments with configurable wait times between each step until 100 percent of traffic is shifted to the new service revision. 

The following validation applies only to Linear deployments created through CloudFormation. CloudFormation operations time out after 36 hours. Linear deployments can approach this limit because of their extended duration. This can cause CloudFormation to roll back the deployment. To prevent timeout-related rollbacks, CloudFormation rejects deployments when the calculated deployment time exceeds 33 hours based on your template configuration: 

 `BakeTimeInMinutes + (StepBakeTimeInMinutes × Number of deployment steps)` 

Where the number of deployment steps is calculated as follows:
+ **If `StepPercent` evenly divides by 100**: The number of deployment steps equals `(100 ÷ StepPercent) - 1`
+ **Otherwise**: The number of deployment steps equals the floor of `100 ÷ StepPercent`. For example, if `StepPercent` is 11, the number of deployment steps is 9 (not 9.1).

This calculation reflects that CloudFormation doesn't apply the step bake time after the final traffic shift reaches 100%. For example, with a `StepPercent` of 50%, there are actually two traffic shifts, but only one deployment step is counted for validation purposes because the bake time is applied only after the first 50% shift, not after reaching 100%.

Additional backend processes (such as task scaling and running lifecycle hooks) can extend deployment time beyond these calculations. Even deployments under the 33-hour threshold might still time out if these processes cause the total duration to exceed 36 hours. 

## Syntax
<a name="aws-properties-ecs-service-linearconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-linearconfiguration-syntax.json"></a>

```
{
  "[StepBakeTimeInMinutes](#cfn-ecs-service-linearconfiguration-stepbaketimeinminutes)" : Integer,
  "[StepPercent](#cfn-ecs-service-linearconfiguration-steppercent)" : Number
}
```

### YAML
<a name="aws-properties-ecs-service-linearconfiguration-syntax.yaml"></a>

```
  [StepBakeTimeInMinutes](#cfn-ecs-service-linearconfiguration-stepbaketimeinminutes): Integer
  [StepPercent](#cfn-ecs-service-linearconfiguration-steppercent): Number
```

## Properties
<a name="aws-properties-ecs-service-linearconfiguration-properties"></a>

`StepBakeTimeInMinutes`  <a name="cfn-ecs-service-linearconfiguration-stepbaketimeinminutes"></a>
The amount of time in minutes to wait between each traffic shifting step during a linear deployment. Valid values are 0 to 1440 minutes (24 hours). The default value is 6. This bake time is not applied after reaching 100 percent traffic.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `1440`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`StepPercent`  <a name="cfn-ecs-service-linearconfiguration-steppercent"></a>
The percentage of production traffic to shift in each step during a linear deployment. Valid values are multiples of 0.1 from 3.0 to 100.0. The default value is 10.0.  
*Required*: No  
*Type*: Number  
*Minimum*: `3`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service LoadBalancer
<a name="aws-properties-ecs-service-loadbalancer"></a>

The `LoadBalancer` property specifies details on a load balancer that is used with a service.

If the service is using the `CODE_DEPLOY` deployment controller, the service is required to use either an Application Load Balancer or Network Load Balancer. When you are creating an AWS CodeDeploy deployment group, you specify two target groups (referred to as a `targetGroupPair`). Each target group binds to a separate task set in the deployment. The load balancer can also have up to two listeners, a required listener for production traffic and an optional listener that allows you to test new revisions of the service before routing production traffic to it.

Services with tasks that use the `awsvpc` network mode (for example, those with the Fargate launch type) only support Application Load Balancers and Network Load Balancers. Classic Load Balancers are not supported. Also, when you create any target groups for these services, you must choose `ip` as the target type, not `instance`. Tasks that use the `awsvpc` network mode are associated with an elastic network interface, not an Amazon EC2 instance.

## Syntax
<a name="aws-properties-ecs-service-loadbalancer-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-loadbalancer-syntax.json"></a>

```
{
  "[AdvancedConfiguration](#cfn-ecs-service-loadbalancer-advancedconfiguration)" : AdvancedConfiguration,
  "[ContainerName](#cfn-ecs-service-loadbalancer-containername)" : String,
  "[ContainerPort](#cfn-ecs-service-loadbalancer-containerport)" : Integer,
  "[LoadBalancerName](#cfn-ecs-service-loadbalancer-loadbalancername)" : String,
  "[TargetGroupArn](#cfn-ecs-service-loadbalancer-targetgrouparn)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-loadbalancer-syntax.yaml"></a>

```
  [AdvancedConfiguration](#cfn-ecs-service-loadbalancer-advancedconfiguration): 
    AdvancedConfiguration
  [ContainerName](#cfn-ecs-service-loadbalancer-containername): String
  [ContainerPort](#cfn-ecs-service-loadbalancer-containerport): Integer
  [LoadBalancerName](#cfn-ecs-service-loadbalancer-loadbalancername): String
  [TargetGroupArn](#cfn-ecs-service-loadbalancer-targetgrouparn): String
```

## Properties
<a name="aws-properties-ecs-service-loadbalancer-properties"></a>

`AdvancedConfiguration`  <a name="cfn-ecs-service-loadbalancer-advancedconfiguration"></a>
The advanced settings for the load balancer used in blue/green deployments. Specify the alternate target group, listener rules, and IAM role required for traffic shifting during blue/green deployments.  
*Required*: No  
*Type*: [AdvancedConfiguration](aws-properties-ecs-service-advancedconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ContainerName`  <a name="cfn-ecs-service-loadbalancer-containername"></a>
The name of the container (as it appears in a container definition) to associate with the load balancer.  
You need to specify the container name when configuring the target group for an Amazon ECS load balancer.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ContainerPort`  <a name="cfn-ecs-service-loadbalancer-containerport"></a>
The port on the container to associate with the load balancer. This port must correspond to a `containerPort` in the task definition the tasks in the service are using. For tasks that use the EC2 launch type, the container instance they're launched on must allow ingress traffic on the `hostPort` of the port mapping.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LoadBalancerName`  <a name="cfn-ecs-service-loadbalancer-loadbalancername"></a>
The name of the load balancer to associate with the Amazon ECS service or task set.  
If you are using an Application Load Balancer or a Network Load Balancer the load balancer name parameter should be omitted.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetGroupArn`  <a name="cfn-ecs-service-loadbalancer-targetgrouparn"></a>
The full Amazon Resource Name (ARN) of the Elastic Load Balancing target group or groups associated with a service or task set.  
A target group ARN is only specified when using an Application Load Balancer or Network Load Balancer.   
For services using the `ECS` deployment controller, you can specify one or multiple target groups. For more information, see [Registering multiple target groups with a service](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html) in the *Amazon Elastic Container Service Developer Guide*.  
For services using the `CODE_DEPLOY` deployment controller, you're required to define two target groups for the load balancer. For more information, see [Blue/green deployment with CodeDeploy](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-bluegreen.html) in the *Amazon Elastic Container Service Developer Guide*.  
If your service's task definition uses the `awsvpc` network mode, you must choose `ip` as the target type, not `instance`. Do this when creating your target groups because tasks that use the `awsvpc` network mode are associated with an elastic network interface, not an Amazon EC2 instance. This network mode is required for the Fargate launch type.
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-loadbalancer--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service LogConfiguration
<a name="aws-properties-ecs-service-logconfiguration"></a>

The log configuration for the container. This parameter maps to `LogConfig` in the docker container create command and the `--log-driver` option to docker run.

By default, containers use the same logging driver that the Docker daemon uses. However, the container might use a different logging driver than the Docker daemon by specifying a log driver configuration in the container definition.

Understand the following when specifying a log configuration for your containers.
+ Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon. Additional log drivers may be available in future releases of the Amazon ECS container agent.

  For tasks on AWS Fargate, the supported log drivers are `awslogs`, `splunk`, and `awsfirelens`.

  For tasks hosted on Amazon EC2 instances, the supported log drivers are `awslogs`, `fluentd`, `gelf`, `json-file`, `journald`,`syslog`, `splunk`, and `awsfirelens`.
+ This parameter requires version 1.18 of the Docker Remote API or greater on your container instance.
+ For tasks that are hosted on Amazon EC2 instances, the Amazon ECS container agent must register the available logging drivers with the `ECS_AVAILABLE_LOGGING_DRIVERS` environment variable before containers placed on that instance can use these log configuration options. For more information, see [Amazon ECS container agent configuration](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) in the *Amazon Elastic Container Service Developer Guide*.
+ For tasks that are on AWS Fargate, because you don't have access to the underlying infrastructure your tasks are hosted on, any additional software needed must be installed outside of the task. For example, the Fluentd output aggregators or a remote host running Logstash to send Gelf logs to.

## Syntax
<a name="aws-properties-ecs-service-logconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-logconfiguration-syntax.json"></a>

```
{
  "[LogDriver](#cfn-ecs-service-logconfiguration-logdriver)" : String,
  "[Options](#cfn-ecs-service-logconfiguration-options)" : {Key: Value, ...},
  "[SecretOptions](#cfn-ecs-service-logconfiguration-secretoptions)" : [ Secret, ... ]
}
```

### YAML
<a name="aws-properties-ecs-service-logconfiguration-syntax.yaml"></a>

```
  [LogDriver](#cfn-ecs-service-logconfiguration-logdriver): String
  [Options](#cfn-ecs-service-logconfiguration-options): 
    Key: Value
  [SecretOptions](#cfn-ecs-service-logconfiguration-secretoptions): 
    - Secret
```

## Properties
<a name="aws-properties-ecs-service-logconfiguration-properties"></a>

`LogDriver`  <a name="cfn-ecs-service-logconfiguration-logdriver"></a>
The log driver to use for the container.  
For tasks on AWS Fargate, the supported log drivers are `awslogs`, `splunk`, and `awsfirelens`.  
For tasks hosted on Amazon EC2 instances, the supported log drivers are `awslogs`, `fluentd`, `gelf`, `json-file`, `journald`, `syslog`, `splunk`, and `awsfirelens`.  
For more information about using the `awslogs` log driver, see [Send Amazon ECS logs to CloudWatch](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) in the *Amazon Elastic Container Service Developer Guide*.  
For more information about using the `awsfirelens` log driver, see [Send Amazon ECS logs to an AWS service or AWS Partner](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html).  
If you have a custom driver that isn't listed, you can fork the Amazon ECS container agent project that's [available on GitHub](https://github.com/aws/amazon-ecs-agent) and customize it to work with that driver. We encourage you to submit pull requests for changes that you would like to have included. However, we don't currently provide support for running modified copies of this software.
*Required*: No  
*Type*: String  
*Allowed values*: `json-file | syslog | journald | gelf | fluentd | awslogs | splunk | awsfirelens`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Options`  <a name="cfn-ecs-service-logconfiguration-options"></a>
The configuration options to send to the log driver.  
The options you can specify depend on the log driver. Some of the options you can specify when you use the `awslogs` log driver to route logs to Amazon CloudWatch include the following:    
awslogs-create-group  
Required: No  
Specify whether you want the log group to be created automatically. If this option isn't specified, it defaults to `false`.  
Your IAM policy must include the `logs:CreateLogGroup` permission before you attempt to use `awslogs-create-group`.  
awslogs-region  
Required: Yes  
Specify the AWS Region that the `awslogs` log driver is to send your Docker logs to. You can choose to send all of your logs from clusters in different Regions to a single region in CloudWatch Logs. This is so that they're all visible in one location. Otherwise, you can separate them by Region for more granularity. Make sure that the specified log group exists in the Region that you specify with this option.  
awslogs-group  
Required: Yes  
Make sure to specify a log group that the `awslogs` log driver sends its log streams to.  
awslogs-stream-prefix  
Required: Yes, when using Fargate.Optional when using EC2.  
Use the `awslogs-stream-prefix` option to associate a log stream with the specified prefix, the container name, and the ID of the Amazon ECS task that the container belongs to. If you specify a prefix with this option, then the log stream takes the format `prefix-name/container-name/ecs-task-id`.  
If you don't specify a prefix with this option, then the log stream is named after the container ID that's assigned by the Docker daemon on the container instance. Because it's difficult to trace logs back to the container that sent them with just the Docker container ID (which is only available on the container instance), we recommend that you specify a prefix with this option.  
For Amazon ECS services, you can use the service name as the prefix. Doing so, you can trace log streams to the service that the container belongs to, the name of the container that sent them, and the ID of the task that the container belongs to.  
You must specify a stream-prefix for your logs to have your logs appear in the Log pane when using the Amazon ECS console.  
awslogs-datetime-format  
Required: No  
This option defines a multiline start pattern in Python `strftime` format. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages.  
One example of a use case for using this format is for parsing output such as a stack dump, which might otherwise be logged in multiple entries. The correct pattern allows it to be captured in a single entry.  
For more information, see [awslogs-datetime-format](https://docs.docker.com/config/containers/logging/awslogs/#awslogs-datetime-format).  
You cannot configure both the `awslogs-datetime-format` and `awslogs-multiline-pattern` options.  
Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance.  
awslogs-multiline-pattern  
Required: No  
This option defines a multiline start pattern that uses a regular expression. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages.  
For more information, see [awslogs-multiline-pattern](https://docs.docker.com/config/containers/logging/awslogs/#awslogs-multiline-pattern).  
This option is ignored if `awslogs-datetime-format` is also configured.  
You cannot configure both the `awslogs-datetime-format` and `awslogs-multiline-pattern` options.  
Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance.
The following options apply to all supported log drivers.    
mode  
Required: No  
Valid values: `non-blocking` \$1 `blocking`  
This option defines the delivery mode of log messages from the container to the log driver specified using `logDriver`. The delivery mode you choose affects application availability when the flow of logs from container is interrupted.  
If you use the `blocking` mode and the flow of logs is interrupted, calls from container code to write to the `stdout` and `stderr` streams will block. The logging thread of the application will block as a result. This may cause the application to become unresponsive and lead to container healthcheck failure.   
If you use the `non-blocking` mode, the container's logs are instead stored in an in-memory intermediate buffer configured with the `max-buffer-size` option. This prevents the application from becoming unresponsive when logs cannot be sent. We recommend using this mode if you want to ensure service availability and are okay with some log loss. For more information, see [Preventing log loss with non-blocking mode in the `awslogs` container log driver](https://aws.amazon.com/blogs/containers/preventing-log-loss-with-non-blocking-mode-in-the-awslogs-container-log-driver/).  
You can set a default `mode` for all containers in a specific AWS Region by using the `defaultLogDriverMode` account setting. If you don't specify the `mode` option or configure the account setting, Amazon ECS will default to the `non-blocking` mode. For more information about the account setting, see [Default log driver mode](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#default-log-driver-mode) in the *Amazon Elastic Container Service Developer Guide*.  
On June 25, 2025, Amazon ECS changed the default log driver mode from `blocking` to `non-blocking` to prioritize task availability over logging. To continue using the `blocking` mode after this change, do one of the following:  
+ Set the `mode` option in your container definition's `logConfiguration` as `blocking`.
+ Set the `defaultLogDriverMode` account setting to `blocking`.  
max-buffer-size  
Required: No  
Default value: `10m`  
When `non-blocking` mode is used, the `max-buffer-size` log option controls the size of the buffer that's used for intermediate message storage. Make sure to specify an adequate buffer size based on your application. When the buffer fills up, further logs cannot be stored. Logs that cannot be stored are lost. 
To route logs using the `splunk` log router, you need to specify a `splunk-token` and a `splunk-url`.  
When you use the `awsfirelens` log router to route logs to an AWS Service or AWS Partner Network destination for log storage and analytics, you can set the `log-driver-buffer-limit` option to limit the number of events that are buffered in memory, before being sent to the log router container. It can help to resolve potential log loss issue because high throughput might result in memory running out for the buffer inside of Docker.  
Other options you can specify when using `awsfirelens` to route logs depend on the destination. When you export logs to Amazon Data Firehose, you can specify the AWS Region with `region` and a name for the log stream with `delivery_stream`.  
When you export logs to Amazon Kinesis Data Streams, you can specify an AWS Region with `region` and a data stream name with `stream`.  
 When you export logs to Amazon OpenSearch Service, you can specify options like `Name`, `Host` (OpenSearch Service endpoint without protocol), `Port`, `Index`, `Type`, `Aws_auth`, `Aws_region`, `Suppress_Type_Name`, and `tls`. For more information, see [Under the hood: FireLens for Amazon ECS Tasks](https://aws.amazon.com/blogs/containers/under-the-hood-firelens-for-amazon-ecs-tasks/).  
When you export logs to Amazon S3, you can specify the bucket using the `bucket` option. You can also specify `region`, `total_file_size`, `upload_timeout`, and `use_put_object` as options.  
This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`  
*Required*: No  
*Type*: Object of String  
*Pattern*: `.{1,}`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SecretOptions`  <a name="cfn-ecs-service-logconfiguration-secretoptions"></a>
The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: Array of [Secret](aws-properties-ecs-service-secret.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-logconfiguration--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service NetworkConfiguration
<a name="aws-properties-ecs-service-networkconfiguration"></a>

The network configuration for a task or service.

## Syntax
<a name="aws-properties-ecs-service-networkconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-networkconfiguration-syntax.json"></a>

```
{
  "[AwsvpcConfiguration](#cfn-ecs-service-networkconfiguration-awsvpcconfiguration)" : AwsVpcConfiguration
}
```

### YAML
<a name="aws-properties-ecs-service-networkconfiguration-syntax.yaml"></a>

```
  [AwsvpcConfiguration](#cfn-ecs-service-networkconfiguration-awsvpcconfiguration): 
    AwsVpcConfiguration
```

## Properties
<a name="aws-properties-ecs-service-networkconfiguration-properties"></a>

`AwsvpcConfiguration`  <a name="cfn-ecs-service-networkconfiguration-awsvpcconfiguration"></a>
The VPC subnets and security groups that are associated with a task.  
All specified subnets and security groups must be from the same VPC.
*Required*: No  
*Type*: [AwsVpcConfiguration](aws-properties-ecs-service-awsvpcconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-networkconfiguration--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service PlacementConstraint
<a name="aws-properties-ecs-service-placementconstraint"></a>

An object representing a constraint on task placement. For more information, see [Task placement constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) in the *Amazon Elastic Container Service Developer Guide*.

**Note**  
If you're using the Fargate launch type, task placement constraints aren't supported.

## Syntax
<a name="aws-properties-ecs-service-placementconstraint-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-placementconstraint-syntax.json"></a>

```
{
  "[Expression](#cfn-ecs-service-placementconstraint-expression)" : String,
  "[Type](#cfn-ecs-service-placementconstraint-type)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-placementconstraint-syntax.yaml"></a>

```
  [Expression](#cfn-ecs-service-placementconstraint-expression): String
  [Type](#cfn-ecs-service-placementconstraint-type): String
```

## Properties
<a name="aws-properties-ecs-service-placementconstraint-properties"></a>

`Expression`  <a name="cfn-ecs-service-placementconstraint-expression"></a>
A cluster query language expression to apply to the constraint. The expression can have a maximum length of 2000 characters. You can't specify an expression if the constraint type is `distinctInstance`. For more information, see [Cluster query language](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-ecs-service-placementconstraint-type"></a>
The type of constraint. Use `distinctInstance` to ensure that each task in a particular group is running on a different container instance. Use `memberOf` to restrict the selection to a group of valid candidates.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `distinctInstance | memberOf`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-placementconstraint--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service PlacementStrategy
<a name="aws-properties-ecs-service-placementstrategy"></a>

The task placement strategy for a task or service. For more information, see [Task placement strategies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-service-placementstrategy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-placementstrategy-syntax.json"></a>

```
{
  "[Field](#cfn-ecs-service-placementstrategy-field)" : String,
  "[Type](#cfn-ecs-service-placementstrategy-type)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-placementstrategy-syntax.yaml"></a>

```
  [Field](#cfn-ecs-service-placementstrategy-field): String
  [Type](#cfn-ecs-service-placementstrategy-type): String
```

## Properties
<a name="aws-properties-ecs-service-placementstrategy-properties"></a>

`Field`  <a name="cfn-ecs-service-placementstrategy-field"></a>
The field to apply the placement strategy against. For the `spread` placement strategy, valid values are `instanceId` (or `host`, which has the same effect), or any platform or custom attribute that's applied to a container instance, such as `attribute:ecs.availability-zone`. For the `binpack` placement strategy, valid values are `cpu` and `memory`. For the `random` placement strategy, this field is not used.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Type`  <a name="cfn-ecs-service-placementstrategy-type"></a>
The type of placement strategy. The `random` placement strategy randomly places tasks on available candidates. The `spread` placement strategy spreads placement across available candidates evenly based on the `field` parameter. The `binpack` strategy places tasks on available candidates that have the least available amount of the resource that's specified with the `field` parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory but still enough to run the task.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `binpack | random | spread`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-placementstrategy--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service Secret
<a name="aws-properties-ecs-service-secret"></a>

An object representing the secret to expose to your container. Secrets can be exposed to a container in the following ways:
+ To inject sensitive data into your containers as environment variables, use the `secrets` container definition parameter.
+ To reference sensitive information in the log configuration of a container, use the `secretOptions` container definition parameter.

For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-service-secret-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-secret-syntax.json"></a>

```
{
  "[Name](#cfn-ecs-service-secret-name)" : String,
  "[ValueFrom](#cfn-ecs-service-secret-valuefrom)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-secret-syntax.yaml"></a>

```
  [Name](#cfn-ecs-service-secret-name): String
  [ValueFrom](#cfn-ecs-service-secret-valuefrom): String
```

## Properties
<a name="aws-properties-ecs-service-secret-properties"></a>

`Name`  <a name="cfn-ecs-service-secret-name"></a>
The name of the secret.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ValueFrom`  <a name="cfn-ecs-service-secret-valuefrom"></a>
The secret to expose to the container. The supported values are either the full ARN of the AWS Secrets Manager secret or the full ARN of the parameter in the SSM Parameter Store.  
For information about the require AWS Identity and Access Management permissions, see [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-secrets.html#secrets-iam) (for Secrets Manager) or [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-parameters.html) (for Systems Manager Parameter store) in the *Amazon Elastic Container Service Developer Guide*.  
If the SSM Parameter Store parameter exists in the same Region as the task you're launching, then you can use either the full ARN or name of the parameter. If the parameter exists in a different Region, then the full ARN must be specified.
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## Examples
<a name="aws-properties-ecs-service-secret--examples"></a>



### Specifying a secret in a service
<a name="aws-properties-ecs-service-secret--examples--Specifying_a_secret_in_a_service"></a>

The following example specifies a secret for the service.

#### JSON
<a name="aws-properties-ecs-service-secret--examples--Specifying_a_secret_in_a_service--json"></a>

```
  {
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
         "ECSTaskDefinition": {
            "Type": "AWS::ECS::TaskDefinition",
            "Properties": {
                "ContainerDefinitions": [
                    {
                        "Essential": true,
                        "Image": "amazon/amazon-ecs-sample",
                        "Name": "example"
                    }
                ],
                "ExecutionRoleArn": "arn:aws:iam::aws_account_id:role/ecsTaskExecutionRole",
                "Family": "task-definition-cfn",
                "Secrets": {
                    "Name": "TestKey",
                    "ValueFrom": 'arn:aws:secretsmanager:region:aws_account_id:secret:secret-name'
                }
            }
        
        }
        }
    }
```

#### YAML
<a name="aws-properties-ecs-service-secret--examples--Specifying_a_secret_in_a_service--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
  ECSTaskDefinition:
    Type: 'AWS::ECS::TaskDefinition'
    Properties:
      ContainerDefinitions:
          Essential: true
          Image: 'amazon/amazon-ecs-sample'
          Name: example
      ExecutionRoleArn: 'arn:aws:iam::aws_account_id:role/ecsTaskExecutionRole'
      Family: task-definition-cfn
      Secrets:
          Name: TestKey
          ValueFrom:'arn:aws:secretsmanager:region:aws_account_id:secret:secret-name'
```

## See also
<a name="aws-properties-ecs-service-secret--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service ServiceConnectAccessLogConfiguration
<a name="aws-properties-ecs-service-serviceconnectaccesslogconfiguration"></a>

Configuration for Service Connect access logging. Access logs provide detailed information about requests made to your service, including request patterns, response codes, and timing data for debugging and monitoring purposes.

**Note**  
To enable access logs, you must also specify a `logConfiguration` in the `serviceConnectConfiguration`.

## Syntax
<a name="aws-properties-ecs-service-serviceconnectaccesslogconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-serviceconnectaccesslogconfiguration-syntax.json"></a>

```
{
  "[Format](#cfn-ecs-service-serviceconnectaccesslogconfiguration-format)" : String,
  "[IncludeQueryParameters](#cfn-ecs-service-serviceconnectaccesslogconfiguration-includequeryparameters)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-serviceconnectaccesslogconfiguration-syntax.yaml"></a>

```
  [Format](#cfn-ecs-service-serviceconnectaccesslogconfiguration-format): String
  [IncludeQueryParameters](#cfn-ecs-service-serviceconnectaccesslogconfiguration-includequeryparameters): String
```

## Properties
<a name="aws-properties-ecs-service-serviceconnectaccesslogconfiguration-properties"></a>

`Format`  <a name="cfn-ecs-service-serviceconnectaccesslogconfiguration-format"></a>
The format for Service Connect access log output. Choose TEXT for human-readable logs or JSON for structured data that integrates well with log analysis tools.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `TEXT | JSON`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IncludeQueryParameters`  <a name="cfn-ecs-service-serviceconnectaccesslogconfiguration-includequeryparameters"></a>
Specifies whether to include query parameters in Service Connect access logs.  
When enabled, query parameters from HTTP requests are included in the access logs. Consider security and privacy implications when enabling this feature, as query parameters may contain sensitive information such as request IDs and tokens. By default, this parameter is `DISABLED`.  
*Required*: No  
*Type*: String  
*Allowed values*: `DISABLED | ENABLED`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service ServiceConnectClientAlias
<a name="aws-properties-ecs-service-serviceconnectclientalias"></a>

Each alias ("endpoint") is a fully-qualified name and port number that other tasks ("clients") can use to connect to this service.

Each name and port mapping must be unique within the namespace.

Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-service-serviceconnectclientalias-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-serviceconnectclientalias-syntax.json"></a>

```
{
  "[DnsName](#cfn-ecs-service-serviceconnectclientalias-dnsname)" : String,
  "[Port](#cfn-ecs-service-serviceconnectclientalias-port)" : Integer,
  "[TestTrafficRules](#cfn-ecs-service-serviceconnectclientalias-testtrafficrules)" : ServiceConnectTestTrafficRules
}
```

### YAML
<a name="aws-properties-ecs-service-serviceconnectclientalias-syntax.yaml"></a>

```
  [DnsName](#cfn-ecs-service-serviceconnectclientalias-dnsname): String
  [Port](#cfn-ecs-service-serviceconnectclientalias-port): Integer
  [TestTrafficRules](#cfn-ecs-service-serviceconnectclientalias-testtrafficrules): 
    ServiceConnectTestTrafficRules
```

## Properties
<a name="aws-properties-ecs-service-serviceconnectclientalias-properties"></a>

`DnsName`  <a name="cfn-ecs-service-serviceconnectclientalias-dnsname"></a>
The `dnsName` is the name that you use in the applications of client tasks to connect to this service. The name must be a valid DNS name but doesn't need to be fully-qualified. The name can include up to 127 characters. The name can include lowercase letters, numbers, underscores (\$1), hyphens (-), and periods (.). The name can't start with a hyphen.  
If this parameter isn't specified, the default value of `discoveryName.namespace` is used. If the `discoveryName` isn't specified, the port mapping name from the task definition is used in `portName.namespace`.  
To avoid changing your applications in client Amazon ECS services, set this to the same name that the client application uses by default. For example, a few common names are `database`, `db`, or the lowercase name of a database, such as `mysql` or `redis`. For more information, see [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Port`  <a name="cfn-ecs-service-serviceconnectclientalias-port"></a>
The listening port number for the Service Connect proxy. This port is available inside of all of the tasks within the same namespace.  
To avoid changing your applications in client Amazon ECS services, set this to the same port that the client application uses by default. For more information, see [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: Yes  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `65535`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TestTrafficRules`  <a name="cfn-ecs-service-serviceconnectclientalias-testtrafficrules"></a>
The configuration for test traffic routing rules used during blue/green deployments with Amazon ECS Service Connect. This allows you to route a portion of traffic to the new service revision of your service for testing before shifting all production traffic.  
*Required*: No  
*Type*: [ServiceConnectTestTrafficRules](aws-properties-ecs-service-serviceconnecttesttrafficrules.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-serviceconnectclientalias--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service ServiceConnectConfiguration
<a name="aws-properties-ecs-service-serviceconnectconfiguration"></a>

The Service Connect configuration of your Amazon ECS service. The configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace.

Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-service-serviceconnectconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-serviceconnectconfiguration-syntax.json"></a>

```
{
  "[AccessLogConfiguration](#cfn-ecs-service-serviceconnectconfiguration-accesslogconfiguration)" : ServiceConnectAccessLogConfiguration,
  "[Enabled](#cfn-ecs-service-serviceconnectconfiguration-enabled)" : Boolean,
  "[LogConfiguration](#cfn-ecs-service-serviceconnectconfiguration-logconfiguration)" : LogConfiguration,
  "[Namespace](#cfn-ecs-service-serviceconnectconfiguration-namespace)" : String,
  "[Services](#cfn-ecs-service-serviceconnectconfiguration-services)" : [ ServiceConnectService, ... ]
}
```

### YAML
<a name="aws-properties-ecs-service-serviceconnectconfiguration-syntax.yaml"></a>

```
  [AccessLogConfiguration](#cfn-ecs-service-serviceconnectconfiguration-accesslogconfiguration): 
    ServiceConnectAccessLogConfiguration
  [Enabled](#cfn-ecs-service-serviceconnectconfiguration-enabled): Boolean
  [LogConfiguration](#cfn-ecs-service-serviceconnectconfiguration-logconfiguration): 
    LogConfiguration
  [Namespace](#cfn-ecs-service-serviceconnectconfiguration-namespace): String
  [Services](#cfn-ecs-service-serviceconnectconfiguration-services): 
    - ServiceConnectService
```

## Properties
<a name="aws-properties-ecs-service-serviceconnectconfiguration-properties"></a>

`AccessLogConfiguration`  <a name="cfn-ecs-service-serviceconnectconfiguration-accesslogconfiguration"></a>
The configuration for Service Connect access logging. Access logs capture detailed information about requests made to your service, including request patterns, response codes, and timing data. They can be useful for debugging connectivity issues, monitoring service performance, and auditing service-to-service communication for security and compliance purposes.  
To enable access logs, you must also specify a `logConfiguration` in the `serviceConnectConfiguration`.
*Required*: No  
*Type*: [ServiceConnectAccessLogConfiguration](aws-properties-ecs-service-serviceconnectaccesslogconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Enabled`  <a name="cfn-ecs-service-serviceconnectconfiguration-enabled"></a>
Specifies whether to use Service Connect with this service.  
*Required*: Yes  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`LogConfiguration`  <a name="cfn-ecs-service-serviceconnectconfiguration-logconfiguration"></a>
The log configuration for the container. This parameter maps to `LogConfig` in the docker container create command and the `--log-driver` option to docker run.  
By default, containers use the same logging driver that the Docker daemon uses. However, the container might use a different logging driver than the Docker daemon by specifying a log driver configuration in the container definition.  
Understand the following when specifying a log configuration for your containers.  
+ Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon. Additional log drivers may be available in future releases of the Amazon ECS container agent.

  For tasks on AWS Fargate, the supported log drivers are `awslogs`, `splunk`, and `awsfirelens`.

  For tasks hosted on Amazon EC2 instances, the supported log drivers are `awslogs`, `fluentd`, `gelf`, `json-file`, `journald`,`syslog`, `splunk`, and `awsfirelens`.
+ This parameter requires version 1.18 of the Docker Remote API or greater on your container instance.
+ For tasks that are hosted on Amazon EC2 instances, the Amazon ECS container agent must register the available logging drivers with the `ECS_AVAILABLE_LOGGING_DRIVERS` environment variable before containers placed on that instance can use these log configuration options. For more information, see [Amazon ECS container agent configuration](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) in the *Amazon Elastic Container Service Developer Guide*.
+ For tasks that are on AWS Fargate, because you don't have access to the underlying infrastructure your tasks are hosted on, any additional software needed must be installed outside of the task. For example, the Fluentd output aggregators or a remote host running Logstash to send Gelf logs to.
*Required*: No  
*Type*: [LogConfiguration](aws-properties-ecs-service-logconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Namespace`  <a name="cfn-ecs-service-serviceconnectconfiguration-namespace"></a>
The namespace name or full Amazon Resource Name (ARN) of the AWS Cloud Map namespace for use with Service Connect. The namespace must be in the same AWS Region as the Amazon ECS service and cluster. The type of namespace doesn't affect Service Connect. For more information about AWS Cloud Map, see [Working with Services](https://docs.aws.amazon.com/cloud-map/latest/dg/working-with-services.html) in the *AWS Cloud Map Developer Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Services`  <a name="cfn-ecs-service-serviceconnectconfiguration-services"></a>
The list of Service Connect service objects. These are names and aliases (also known as endpoints) that are used by other Amazon ECS services to connect to this service.   
This field is not required for a "client" Amazon ECS service that's a member of a namespace only to connect to other services within the namespace. An example of this would be a frontend application that accepts incoming requests from either a load balancer that's attached to the service or by other means.  
An object selects a port from the task definition, assigns a name for the AWS Cloud Map service, and a list of aliases (endpoints) and ports for client applications to refer to this service.  
*Required*: No  
*Type*: Array of [ServiceConnectService](aws-properties-ecs-service-serviceconnectservice.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-serviceconnectconfiguration--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service ServiceConnectService
<a name="aws-properties-ecs-service-serviceconnectservice"></a>

The Service Connect service object configuration. For more information, see [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-service-serviceconnectservice-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-serviceconnectservice-syntax.json"></a>

```
{
  "[ClientAliases](#cfn-ecs-service-serviceconnectservice-clientaliases)" : [ ServiceConnectClientAlias, ... ],
  "[DiscoveryName](#cfn-ecs-service-serviceconnectservice-discoveryname)" : String,
  "[IngressPortOverride](#cfn-ecs-service-serviceconnectservice-ingressportoverride)" : Integer,
  "[PortName](#cfn-ecs-service-serviceconnectservice-portname)" : String,
  "[Timeout](#cfn-ecs-service-serviceconnectservice-timeout)" : TimeoutConfiguration,
  "[Tls](#cfn-ecs-service-serviceconnectservice-tls)" : ServiceConnectTlsConfiguration
}
```

### YAML
<a name="aws-properties-ecs-service-serviceconnectservice-syntax.yaml"></a>

```
  [ClientAliases](#cfn-ecs-service-serviceconnectservice-clientaliases): 
    - ServiceConnectClientAlias
  [DiscoveryName](#cfn-ecs-service-serviceconnectservice-discoveryname): String
  [IngressPortOverride](#cfn-ecs-service-serviceconnectservice-ingressportoverride): Integer
  [PortName](#cfn-ecs-service-serviceconnectservice-portname): String
  [Timeout](#cfn-ecs-service-serviceconnectservice-timeout): 
    TimeoutConfiguration
  [Tls](#cfn-ecs-service-serviceconnectservice-tls): 
    ServiceConnectTlsConfiguration
```

## Properties
<a name="aws-properties-ecs-service-serviceconnectservice-properties"></a>

`ClientAliases`  <a name="cfn-ecs-service-serviceconnectservice-clientaliases"></a>
The list of client aliases for this Service Connect service. You use these to assign names that can be used by client applications. The maximum number of client aliases that you can have in this list is 1.  
Each alias ("endpoint") is a fully-qualified name and port number that other Amazon ECS tasks ("clients") can use to connect to this service.  
Each name and port mapping must be unique within the namespace.  
For each `ServiceConnectService`, you must provide at least one `clientAlias` with one `port`.  
*Required*: No  
*Type*: Array of [ServiceConnectClientAlias](aws-properties-ecs-service-serviceconnectclientalias.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`DiscoveryName`  <a name="cfn-ecs-service-serviceconnectservice-discoveryname"></a>
The `discoveryName` is the name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service. This must be unique within the AWS Cloud Map namespace. The name can contain up to 64 characters. The name can include lowercase letters, numbers, underscores (\$1), and hyphens (-). The name can't start with a hyphen.  
If the `discoveryName` isn't specified, the port mapping name from the task definition is used in `portName.namespace`.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`IngressPortOverride`  <a name="cfn-ecs-service-serviceconnectservice-ingressportoverride"></a>
The port number for the Service Connect proxy to listen on.  
Use the value of this field to bypass the proxy for traffic on the port number specified in the named `portMapping` in the task definition of this application, and then use it in your VPC security groups to allow traffic into the proxy for this Amazon ECS service.  
In `awsvpc` mode and Fargate, the default value is the container port number. The container port number is in the `portMapping` in the task definition. In bridge mode, the default value is the ephemeral port of the Service Connect proxy.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `65535`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PortName`  <a name="cfn-ecs-service-serviceconnectservice-portname"></a>
The `portName` must match the name of one of the `portMappings` from all the containers in the task definition of this Amazon ECS service.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Timeout`  <a name="cfn-ecs-service-serviceconnectservice-timeout"></a>
A reference to an object that represents the configured timeouts for Service Connect.  
*Required*: No  
*Type*: [TimeoutConfiguration](aws-properties-ecs-service-timeoutconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Tls`  <a name="cfn-ecs-service-serviceconnectservice-tls"></a>
A reference to an object that represents a Transport Layer Security (TLS) configuration.  
*Required*: No  
*Type*: [ServiceConnectTlsConfiguration](aws-properties-ecs-service-serviceconnecttlsconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-serviceconnectservice--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service ServiceConnectTestTrafficRules
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrules"></a>

The test traffic routing configuration for Amazon ECS blue/green deployments. This configuration allows you to define rules for routing specific traffic to the new service revision during the deployment process, allowing for safe testing before full production traffic shift.

For more information, see [Service Connect for Amazon ECS blue/green deployments](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect-blue-green.html) in the * Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrules-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrules-syntax.json"></a>

```
{
  "[Header](#cfn-ecs-service-serviceconnecttesttrafficrules-header)" : ServiceConnectTestTrafficRulesHeader
}
```

### YAML
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrules-syntax.yaml"></a>

```
  [Header](#cfn-ecs-service-serviceconnecttesttrafficrules-header): 
    ServiceConnectTestTrafficRulesHeader
```

## Properties
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrules-properties"></a>

`Header`  <a name="cfn-ecs-service-serviceconnecttesttrafficrules-header"></a>
The HTTP header-based routing rules that determine which requests should be routed to the new service version during blue/green deployment testing. These rules provide fine-grained control over test traffic routing based on request headers.  
*Required*: Yes  
*Type*: [ServiceConnectTestTrafficRulesHeader](aws-properties-ecs-service-serviceconnecttesttrafficrulesheader.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service ServiceConnectTestTrafficRulesHeader
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheader"></a>

<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheader-description"></a>The `ServiceConnectTestTrafficRulesHeader` property type specifies Property description not available. for an [AWS::ECS::Service](aws-resource-ecs-service.md).

## Syntax
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheader-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheader-syntax.json"></a>

```
{
  "[Name](#cfn-ecs-service-serviceconnecttesttrafficrulesheader-name)" : String,
  "[Value](#cfn-ecs-service-serviceconnecttesttrafficrulesheader-value)" : ServiceConnectTestTrafficRulesHeaderValue
}
```

### YAML
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheader-syntax.yaml"></a>

```
  [Name](#cfn-ecs-service-serviceconnecttesttrafficrulesheader-name): String
  [Value](#cfn-ecs-service-serviceconnecttesttrafficrulesheader-value): 
    ServiceConnectTestTrafficRulesHeaderValue
```

## Properties
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheader-properties"></a>

`Name`  <a name="cfn-ecs-service-serviceconnecttesttrafficrulesheader-name"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ecs-service-serviceconnecttesttrafficrulesheader-value"></a>
Property description not available.  
*Required*: No  
*Type*: [ServiceConnectTestTrafficRulesHeaderValue](aws-properties-ecs-service-serviceconnecttesttrafficrulesheadervalue.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service ServiceConnectTestTrafficRulesHeaderValue
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheadervalue"></a>

<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheadervalue-description"></a>The `ServiceConnectTestTrafficRulesHeaderValue` property type specifies Property description not available. for an [AWS::ECS::Service](aws-resource-ecs-service.md).

## Syntax
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheadervalue-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheadervalue-syntax.json"></a>

```
{
  "[Exact](#cfn-ecs-service-serviceconnecttesttrafficrulesheadervalue-exact)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheadervalue-syntax.yaml"></a>

```
  [Exact](#cfn-ecs-service-serviceconnecttesttrafficrulesheadervalue-exact): String
```

## Properties
<a name="aws-properties-ecs-service-serviceconnecttesttrafficrulesheadervalue-properties"></a>

`Exact`  <a name="cfn-ecs-service-serviceconnecttesttrafficrulesheadervalue-exact"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service ServiceConnectTlsCertificateAuthority
<a name="aws-properties-ecs-service-serviceconnecttlscertificateauthority"></a>

The certificate root authority that secures your service.

## Syntax
<a name="aws-properties-ecs-service-serviceconnecttlscertificateauthority-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-serviceconnecttlscertificateauthority-syntax.json"></a>

```
{
  "[AwsPcaAuthorityArn](#cfn-ecs-service-serviceconnecttlscertificateauthority-awspcaauthorityarn)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-serviceconnecttlscertificateauthority-syntax.yaml"></a>

```
  [AwsPcaAuthorityArn](#cfn-ecs-service-serviceconnecttlscertificateauthority-awspcaauthorityarn): String
```

## Properties
<a name="aws-properties-ecs-service-serviceconnecttlscertificateauthority-properties"></a>

`AwsPcaAuthorityArn`  <a name="cfn-ecs-service-serviceconnecttlscertificateauthority-awspcaauthorityarn"></a>
The ARN of the AWS Private Certificate Authority certificate.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-serviceconnecttlscertificateauthority--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service ServiceConnectTlsConfiguration
<a name="aws-properties-ecs-service-serviceconnecttlsconfiguration"></a>

The key that encrypts and decrypts your resources for Service Connect TLS.

## Syntax
<a name="aws-properties-ecs-service-serviceconnecttlsconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-serviceconnecttlsconfiguration-syntax.json"></a>

```
{
  "[IssuerCertificateAuthority](#cfn-ecs-service-serviceconnecttlsconfiguration-issuercertificateauthority)" : ServiceConnectTlsCertificateAuthority,
  "[KmsKey](#cfn-ecs-service-serviceconnecttlsconfiguration-kmskey)" : String,
  "[RoleArn](#cfn-ecs-service-serviceconnecttlsconfiguration-rolearn)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-serviceconnecttlsconfiguration-syntax.yaml"></a>

```
  [IssuerCertificateAuthority](#cfn-ecs-service-serviceconnecttlsconfiguration-issuercertificateauthority): 
    ServiceConnectTlsCertificateAuthority
  [KmsKey](#cfn-ecs-service-serviceconnecttlsconfiguration-kmskey): String
  [RoleArn](#cfn-ecs-service-serviceconnecttlsconfiguration-rolearn): String
```

## Properties
<a name="aws-properties-ecs-service-serviceconnecttlsconfiguration-properties"></a>

`IssuerCertificateAuthority`  <a name="cfn-ecs-service-serviceconnecttlsconfiguration-issuercertificateauthority"></a>
The signer certificate authority.  
*Required*: Yes  
*Type*: [ServiceConnectTlsCertificateAuthority](aws-properties-ecs-service-serviceconnecttlscertificateauthority.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KmsKey`  <a name="cfn-ecs-service-serviceconnecttlsconfiguration-kmskey"></a>
The AWS Key Management Service key.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-ecs-service-serviceconnecttlsconfiguration-rolearn"></a>
The Amazon Resource Name (ARN) of the IAM role that's associated with the Service Connect TLS.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service ServiceManagedEBSVolumeConfiguration
<a name="aws-properties-ecs-service-servicemanagedebsvolumeconfiguration"></a>

The configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. These settings are used to create each Amazon EBS volume, with one volume created for each task in the service. For information about the supported launch types and operating systems, see [Supported operating systems and launch types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-volumes.html#ebs-volumes-configuration) in the* Amazon Elastic Container Service Developer Guide*.

Many of these parameters map 1:1 with the Amazon EBS `CreateVolume` API request parameters.

## Syntax
<a name="aws-properties-ecs-service-servicemanagedebsvolumeconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-servicemanagedebsvolumeconfiguration-syntax.json"></a>

```
{
  "[Encrypted](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-encrypted)" : Boolean,
  "[FilesystemType](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-filesystemtype)" : String,
  "[Iops](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-iops)" : Integer,
  "[KmsKeyId](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-kmskeyid)" : String,
  "[RoleArn](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-rolearn)" : String,
  "[SizeInGiB](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-sizeingib)" : Integer,
  "[SnapshotId](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-snapshotid)" : String,
  "[TagSpecifications](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-tagspecifications)" : [ EBSTagSpecification, ... ],
  "[Throughput](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-throughput)" : Integer,
  "[VolumeInitializationRate](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-volumeinitializationrate)" : Integer,
  "[VolumeType](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-volumetype)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-servicemanagedebsvolumeconfiguration-syntax.yaml"></a>

```
  [Encrypted](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-encrypted): Boolean
  [FilesystemType](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-filesystemtype): String
  [Iops](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-iops): Integer
  [KmsKeyId](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-kmskeyid): String
  [RoleArn](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-rolearn): String
  [SizeInGiB](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-sizeingib): Integer
  [SnapshotId](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-snapshotid): String
  [TagSpecifications](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-tagspecifications): 
    - EBSTagSpecification
  [Throughput](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-throughput): Integer
  [VolumeInitializationRate](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-volumeinitializationrate): Integer
  [VolumeType](#cfn-ecs-service-servicemanagedebsvolumeconfiguration-volumetype): String
```

## Properties
<a name="aws-properties-ecs-service-servicemanagedebsvolumeconfiguration-properties"></a>

`Encrypted`  <a name="cfn-ecs-service-servicemanagedebsvolumeconfiguration-encrypted"></a>
Indicates whether the volume should be encrypted. If you turn on Region-level Amazon EBS encryption by default but set this value as `false`, the setting is overridden and the volume is encrypted with the KMS key specified for Amazon EBS encryption by default. This parameter maps 1:1 with the `Encrypted` parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the *Amazon EC2 API Reference*.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`FilesystemType`  <a name="cfn-ecs-service-servicemanagedebsvolumeconfiguration-filesystemtype"></a>
The filesystem type for the volume. For volumes created from a snapshot, you must specify the same filesystem type that the volume was using when the snapshot was created. If there is a filesystem type mismatch, the tasks will fail to start.  
The available Linux filesystem types are `ext3`, `ext4`, and `xfs`. If no value is specified, the `xfs` filesystem type is used by default.  
The available Windows filesystem types are `NTFS`.  
*Required*: No  
*Type*: String  
*Allowed values*: `ext3 | ext4 | xfs | ntfs`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Iops`  <a name="cfn-ecs-service-servicemanagedebsvolumeconfiguration-iops"></a>
The number of I/O operations per second (IOPS). For `gp3`, `io1`, and `io2` volumes, this represents the number of IOPS that are provisioned for the volume. For `gp2` volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting.  
The following are the supported values for each volume type.  
+ `gp3`: 3,000 - 16,000 IOPS
+ `io1`: 100 - 64,000 IOPS
+ `io2`: 100 - 256,000 IOPS
This parameter is required for `io1` and `io2` volume types. The default for `gp3` volumes is `3,000 IOPS`. This parameter is not supported for `st1`, `sc1`, or `standard` volume types.  
This parameter maps 1:1 with the `Iops` parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the *Amazon EC2 API Reference*.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`KmsKeyId`  <a name="cfn-ecs-service-servicemanagedebsvolumeconfiguration-kmskeyid"></a>
The Amazon Resource Name (ARN) identifier of the AWS Key Management Service key to use for Amazon EBS encryption. When a key is specified using this parameter, it overrides Amazon EBS default encryption or any KMS key that you specified for cluster-level managed storage encryption. This parameter maps 1:1 with the `KmsKeyId` parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the *Amazon EC2 API Reference*. For more information about encrypting Amazon EBS volumes attached to tasks, see [Encrypt data stored in Amazon EBS volumes attached to Amazon ECS tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ebs-kms-encryption.html).  
AWS authenticates the AWS Key Management Service key asynchronously. Therefore, if you specify an ID, alias, or ARN that is invalid, the action can appear to complete, but eventually fails.
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-ecs-service-servicemanagedebsvolumeconfiguration-rolearn"></a>
The ARN of the IAM role to associate with this volume. This is the Amazon ECS infrastructure IAM role that is used to manage your AWS infrastructure. We recommend using the Amazon ECS-managed `AmazonECSInfrastructureRolePolicyForVolumes` IAM policy with this role. For more information, see [Amazon ECS infrastructure IAM role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/infrastructure_IAM_role.html) in the *Amazon ECS Developer Guide*.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SizeInGiB`  <a name="cfn-ecs-service-servicemanagedebsvolumeconfiguration-sizeingib"></a>
The size of the volume in GiB. You must specify either a volume size or a snapshot ID. If you specify a snapshot ID, the snapshot size is used for the volume size by default. You can optionally specify a volume size greater than or equal to the snapshot size. This parameter maps 1:1 with the `Size` parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the *Amazon EC2 API Reference*.  
The following are the supported volume size values for each volume type.  
+ `gp2` and `gp3`: 1-16,384
+ `io1` and `io2`: 4-16,384
+ `st1` and `sc1`: 125-16,384
+ `standard`: 1-1,024
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`SnapshotId`  <a name="cfn-ecs-service-servicemanagedebsvolumeconfiguration-snapshotid"></a>
The snapshot that Amazon ECS uses to create volumes for attachment to tasks maintained by the service. You must specify either `snapshotId` or `sizeInGiB` in your volume configuration. This parameter maps 1:1 with the `SnapshotId` parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the *Amazon EC2 API Reference*.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TagSpecifications`  <a name="cfn-ecs-service-servicemanagedebsvolumeconfiguration-tagspecifications"></a>
The tags to apply to the volume. Amazon ECS applies service-managed tags by default. This parameter maps 1:1 with the `TagSpecifications.N` parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the *Amazon EC2 API Reference*.  
*Required*: No  
*Type*: Array of [EBSTagSpecification](aws-properties-ecs-service-ebstagspecification.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Throughput`  <a name="cfn-ecs-service-servicemanagedebsvolumeconfiguration-throughput"></a>
The throughput to provision for a volume, in MiB/s, with a maximum of 1,000 MiB/s. This parameter maps 1:1 with the `Throughput` parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the *Amazon EC2 API Reference*.  
This parameter is only supported for the `gp3` volume type.
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VolumeInitializationRate`  <a name="cfn-ecs-service-servicemanagedebsvolumeconfiguration-volumeinitializationrate"></a>
The rate, in MiB/s, at which data is fetched from a snapshot of an existing EBS volume to create new volumes for attachment to the tasks maintained by the service. This property can be specified only if you specify a `snapshotId`. For more information, see [Initialize Amazon EBS volumes](https://docs.aws.amazon.com/ebs/latest/userguide/initalize-volume.html) in the *Amazon EBS User Guide*.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`VolumeType`  <a name="cfn-ecs-service-servicemanagedebsvolumeconfiguration-volumetype"></a>
The volume type. This parameter maps 1:1 with the `VolumeType` parameter of the [CreateVolume API](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVolume.html) in the *Amazon EC2 API Reference*. For more information, see [Amazon EBS volume types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volume-types.html) in the *Amazon EC2 User Guide*.  
The following are the supported volume types.  
+ General Purpose SSD: `gp2`\$1`gp3`
+ Provisioned IOPS SSD: `io1`\$1`io2`
+ Throughput Optimized HDD: `st1`
+ Cold HDD: `sc1`
+ Magnetic: `standard`
**Note**  
The magnetic volume type is not supported on Fargate.
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service ServiceRegistry
<a name="aws-properties-ecs-service-serviceregistry"></a>

The details for the service registry.

Each service may be associated with one service registry. Multiple service registries for each service are not supported.

When you add, update, or remove the service registries configuration, Amazon ECS starts a new deployment. New tasks are registered and deregistered to the updated service registry configuration.

## Syntax
<a name="aws-properties-ecs-service-serviceregistry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-serviceregistry-syntax.json"></a>

```
{
  "[ContainerName](#cfn-ecs-service-serviceregistry-containername)" : String,
  "[ContainerPort](#cfn-ecs-service-serviceregistry-containerport)" : Integer,
  "[Port](#cfn-ecs-service-serviceregistry-port)" : Integer,
  "[RegistryArn](#cfn-ecs-service-serviceregistry-registryarn)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-serviceregistry-syntax.yaml"></a>

```
  [ContainerName](#cfn-ecs-service-serviceregistry-containername): String
  [ContainerPort](#cfn-ecs-service-serviceregistry-containerport): Integer
  [Port](#cfn-ecs-service-serviceregistry-port): Integer
  [RegistryArn](#cfn-ecs-service-serviceregistry-registryarn): String
```

## Properties
<a name="aws-properties-ecs-service-serviceregistry-properties"></a>

`ContainerName`  <a name="cfn-ecs-service-serviceregistry-containername"></a>
The container name value to be used for your service discovery service. It's already specified in the task definition. If the task definition that your service task specifies uses the `bridge` or `host` network mode, you must specify a `containerName` and `containerPort` combination from the task definition. If the task definition that your service task specifies uses the `awsvpc` network mode and a type SRV DNS record is used, you must specify either a `containerName` and `containerPort` combination or a `port` value. However, you can't specify both.  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`ContainerPort`  <a name="cfn-ecs-service-serviceregistry-containerport"></a>
The port value to be used for your service discovery service. It's already specified in the task definition. If the task definition your service task specifies uses the `bridge` or `host` network mode, you must specify a `containerName` and `containerPort` combination from the task definition. If the task definition your service task specifies uses the `awsvpc` network mode and a type SRV DNS record is used, you must specify either a `containerName` and `containerPort` combination or a `port` value. However, you can't specify both.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Port`  <a name="cfn-ecs-service-serviceregistry-port"></a>
The port value used if your service discovery service specified an SRV record. This field might be used if both the `awsvpc` network mode and SRV records are used.  
*Required*: No  
*Type*: Integer  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RegistryArn`  <a name="cfn-ecs-service-serviceregistry-registryarn"></a>
The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is AWS Cloud Map. For more information, see [CreateService](https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html).  
*Required*: No  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-serviceregistry--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service ServiceVolumeConfiguration
<a name="aws-properties-ecs-service-servicevolumeconfiguration"></a>

The configuration for a volume specified in the task definition as a volume that is configured at launch time. Currently, the only supported volume type is an Amazon EBS volume.

## Syntax
<a name="aws-properties-ecs-service-servicevolumeconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-servicevolumeconfiguration-syntax.json"></a>

```
{
  "[ManagedEBSVolume](#cfn-ecs-service-servicevolumeconfiguration-managedebsvolume)" : ServiceManagedEBSVolumeConfiguration,
  "[Name](#cfn-ecs-service-servicevolumeconfiguration-name)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-servicevolumeconfiguration-syntax.yaml"></a>

```
  [ManagedEBSVolume](#cfn-ecs-service-servicevolumeconfiguration-managedebsvolume): 
    ServiceManagedEBSVolumeConfiguration
  [Name](#cfn-ecs-service-servicevolumeconfiguration-name): String
```

## Properties
<a name="aws-properties-ecs-service-servicevolumeconfiguration-properties"></a>

`ManagedEBSVolume`  <a name="cfn-ecs-service-servicevolumeconfiguration-managedebsvolume"></a>
The configuration for the Amazon EBS volume that Amazon ECS creates and manages on your behalf. These settings are used to create each Amazon EBS volume, with one volume created for each task in the service. The Amazon EBS volumes are visible in your account in the Amazon EC2 console once they are created.  
*Required*: No  
*Type*: [ServiceManagedEBSVolumeConfiguration](aws-properties-ecs-service-servicemanagedebsvolumeconfiguration.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Name`  <a name="cfn-ecs-service-servicevolumeconfiguration-name"></a>
The name of the volume. This value must match the volume name from the `Volume` object in the task definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::Service Tag
<a name="aws-properties-ecs-service-tag"></a>

The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

The following basic restrictions apply to tags:
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

In order to tag a service that has the following ARN format, you need to migrate the service to the long ARN. You must use the API, CLI or console to migrate the service ARN. For more information, see [Migrate an Amazon ECS short service ARN to a long ARN](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-arn-migration.html) in the *Amazon Elastic Container Service Developer Guide*.

 `arn:aws:ecs:region:aws_account_id:service/service-name` 

After the migration is complete, the following are true:
+  The service ARN is: `arn:aws:ecs:region:aws_account_id:service/cluster-name/service-name`
+ You can use CloudFormation to tag the service as you would a service with a long ARN format.
+ When the `PhysicalResourceId` in the CloudFormation stack represents a service, the value does not change and will be the short service ARN. 

## Syntax
<a name="aws-properties-ecs-service-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-tag-syntax.json"></a>

```
{
  "[Key](#cfn-ecs-service-tag-key)" : String,
  "[Value](#cfn-ecs-service-tag-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-tag-syntax.yaml"></a>

```
  [Key](#cfn-ecs-service-tag-key): String
  [Value](#cfn-ecs-service-tag-value): String
```

## Properties
<a name="aws-properties-ecs-service-tag-properties"></a>

`Key`  <a name="cfn-ecs-service-tag-key"></a>
One part of a key-value pair that make up a tag. A `key` is a general label that acts like a category for more specific tag values.  
*Required*: No  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ecs-service-tag-value"></a>
The optional part of a key-value pair that make up a tag. A `value` acts as a descriptor within a tag category (key).  
*Required*: No  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-tag--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 
+  [Migrate an Amazon ECS short service ARN to a long ARN](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-arn-migration.html) 

# AWS::ECS::Service TimeoutConfiguration
<a name="aws-properties-ecs-service-timeoutconfiguration"></a>

An object that represents the timeout configurations for Service Connect.

**Note**  
If `idleTimeout` is set to a time that is less than `perRequestTimeout`, the connection will close when the `idleTimeout` is reached and not the `perRequestTimeout`.

## Syntax
<a name="aws-properties-ecs-service-timeoutconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-timeoutconfiguration-syntax.json"></a>

```
{
  "[IdleTimeoutSeconds](#cfn-ecs-service-timeoutconfiguration-idletimeoutseconds)" : Integer,
  "[PerRequestTimeoutSeconds](#cfn-ecs-service-timeoutconfiguration-perrequesttimeoutseconds)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-service-timeoutconfiguration-syntax.yaml"></a>

```
  [IdleTimeoutSeconds](#cfn-ecs-service-timeoutconfiguration-idletimeoutseconds): Integer
  [PerRequestTimeoutSeconds](#cfn-ecs-service-timeoutconfiguration-perrequesttimeoutseconds): Integer
```

## Properties
<a name="aws-properties-ecs-service-timeoutconfiguration-properties"></a>

`IdleTimeoutSeconds`  <a name="cfn-ecs-service-timeoutconfiguration-idletimeoutseconds"></a>
The amount of time in seconds a connection will stay active while idle. A value of `0` can be set to disable `idleTimeout`.  
The `idleTimeout` default for `HTTP`/`HTTP2`/`GRPC` is 5 minutes.  
The `idleTimeout` default for `TCP` is 1 hour.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `2147483647`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`PerRequestTimeoutSeconds`  <a name="cfn-ecs-service-timeoutconfiguration-perrequesttimeoutseconds"></a>
The amount of time waiting for the upstream to respond with a complete response per request. A value of `0` can be set to disable `perRequestTimeout`. `perRequestTimeout` can only be set if Service Connect `appProtocol` isn't `TCP`. Only `idleTimeout` is allowed for `TCP``appProtocol`.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `2147483647`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-service-timeoutconfiguration--seealso"></a>
+  [Associate an Application Load Balancer with a service](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#aws-resource-ecs-service--examples--Associate_an_Application_Load_Balancer_with_a_service) 

# AWS::ECS::Service VpcLatticeConfiguration
<a name="aws-properties-ecs-service-vpclatticeconfiguration"></a>

The VPC Lattice configuration for your service that holds the information for the target group(s) Amazon ECS tasks will be registered to.

## Syntax
<a name="aws-properties-ecs-service-vpclatticeconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-service-vpclatticeconfiguration-syntax.json"></a>

```
{
  "[PortName](#cfn-ecs-service-vpclatticeconfiguration-portname)" : String,
  "[RoleArn](#cfn-ecs-service-vpclatticeconfiguration-rolearn)" : String,
  "[TargetGroupArn](#cfn-ecs-service-vpclatticeconfiguration-targetgrouparn)" : String
}
```

### YAML
<a name="aws-properties-ecs-service-vpclatticeconfiguration-syntax.yaml"></a>

```
  [PortName](#cfn-ecs-service-vpclatticeconfiguration-portname): String
  [RoleArn](#cfn-ecs-service-vpclatticeconfiguration-rolearn): String
  [TargetGroupArn](#cfn-ecs-service-vpclatticeconfiguration-targetgrouparn): String
```

## Properties
<a name="aws-properties-ecs-service-vpclatticeconfiguration-properties"></a>

`PortName`  <a name="cfn-ecs-service-vpclatticeconfiguration-portname"></a>
The name of the port mapping to register in the VPC Lattice target group. This is the name of the `portMapping` you defined in your task definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`RoleArn`  <a name="cfn-ecs-service-vpclatticeconfiguration-rolearn"></a>
The ARN of the IAM role to associate with this VPC Lattice configuration. This is the Amazon ECS infrastructure IAM role that is used to manage your VPC Lattice infrastructure.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TargetGroupArn`  <a name="cfn-ecs-service-vpclatticeconfiguration-targetgrouparn"></a>
The full Amazon Resource Name (ARN) of the target group or groups associated with the VPC Lattice configuration that the Amazon ECS tasks will be registered to.  
*Required*: Yes  
*Type*: String  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::TaskDefinition
<a name="aws-resource-ecs-taskdefinition"></a>

Registers a new task definition from the supplied `family` and `containerDefinitions`. Optionally, you can add data volumes to your containers with the `volumes` parameter. For more information about task definition parameters and defaults, see [Amazon ECS Task Definitions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) in the *Amazon Elastic Container Service Developer Guide*.

You can specify a role for your task with the `taskRoleArn` parameter. When you specify a role for a task, its containers can then use the latest versions of the AWS CLI or SDKs to make API requests to the AWS services that are specified in the policy that's associated with the role. For more information, see [IAM Roles for Tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) in the *Amazon Elastic Container Service Developer Guide*.

You can specify a Docker networking mode for the containers in your task definition with the `networkMode` parameter. If you specify the `awsvpc` network mode, the task is allocated an elastic network interface, and you must specify a [NetworkConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html) when you create a service or run a task with the task definition. For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-resource-ecs-taskdefinition-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ecs-taskdefinition-syntax.json"></a>

```
{
  "Type" : "AWS::ECS::TaskDefinition",
  "Properties" : {
      "[ContainerDefinitions](#cfn-ecs-taskdefinition-containerdefinitions)" : [ ContainerDefinition, ... ],
      "[Cpu](#cfn-ecs-taskdefinition-cpu)" : String,
      "[EnableFaultInjection](#cfn-ecs-taskdefinition-enablefaultinjection)" : Boolean,
      "[EphemeralStorage](#cfn-ecs-taskdefinition-ephemeralstorage)" : EphemeralStorage,
      "[ExecutionRoleArn](#cfn-ecs-taskdefinition-executionrolearn)" : String,
      "[Family](#cfn-ecs-taskdefinition-family)" : String,
      "[IpcMode](#cfn-ecs-taskdefinition-ipcmode)" : String,
      "[Memory](#cfn-ecs-taskdefinition-memory)" : String,
      "[NetworkMode](#cfn-ecs-taskdefinition-networkmode)" : String,
      "[PidMode](#cfn-ecs-taskdefinition-pidmode)" : String,
      "[PlacementConstraints](#cfn-ecs-taskdefinition-placementconstraints)" : [ TaskDefinitionPlacementConstraint, ... ],
      "[ProxyConfiguration](#cfn-ecs-taskdefinition-proxyconfiguration)" : ProxyConfiguration,
      "[RequiresCompatibilities](#cfn-ecs-taskdefinition-requirescompatibilities)" : [ String, ... ],
      "[RuntimePlatform](#cfn-ecs-taskdefinition-runtimeplatform)" : RuntimePlatform,
      "[Tags](#cfn-ecs-taskdefinition-tags)" : [ Tag, ... ],
      "[TaskRoleArn](#cfn-ecs-taskdefinition-taskrolearn)" : String,
      "[Volumes](#cfn-ecs-taskdefinition-volumes)" : [ Volume, ... ]
    }
}
```

### YAML
<a name="aws-resource-ecs-taskdefinition-syntax.yaml"></a>

```
Type: AWS::ECS::TaskDefinition
Properties:
  [ContainerDefinitions](#cfn-ecs-taskdefinition-containerdefinitions): 
    - ContainerDefinition
  [Cpu](#cfn-ecs-taskdefinition-cpu): String
  [EnableFaultInjection](#cfn-ecs-taskdefinition-enablefaultinjection): Boolean
  [EphemeralStorage](#cfn-ecs-taskdefinition-ephemeralstorage): 
    EphemeralStorage
  [ExecutionRoleArn](#cfn-ecs-taskdefinition-executionrolearn): String
  [Family](#cfn-ecs-taskdefinition-family): String
  [IpcMode](#cfn-ecs-taskdefinition-ipcmode): String
  [Memory](#cfn-ecs-taskdefinition-memory): String
  [NetworkMode](#cfn-ecs-taskdefinition-networkmode): String
  [PidMode](#cfn-ecs-taskdefinition-pidmode): String
  [PlacementConstraints](#cfn-ecs-taskdefinition-placementconstraints): 
    - TaskDefinitionPlacementConstraint
  [ProxyConfiguration](#cfn-ecs-taskdefinition-proxyconfiguration): 
    ProxyConfiguration
  [RequiresCompatibilities](#cfn-ecs-taskdefinition-requirescompatibilities): 
    - String
  [RuntimePlatform](#cfn-ecs-taskdefinition-runtimeplatform): 
    RuntimePlatform
  [Tags](#cfn-ecs-taskdefinition-tags): 
    - Tag
  [TaskRoleArn](#cfn-ecs-taskdefinition-taskrolearn): String
  [Volumes](#cfn-ecs-taskdefinition-volumes): 
    - Volume
```

## Properties
<a name="aws-resource-ecs-taskdefinition-properties"></a>

`ContainerDefinitions`  <a name="cfn-ecs-taskdefinition-containerdefinitions"></a>
A list of container definitions in JSON format that describe the different containers that make up your task. For more information about container definition parameters and defaults, see [Amazon ECS Task Definitions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_defintions.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: Array of [ContainerDefinition](aws-properties-ecs-taskdefinition-containerdefinition.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Cpu`  <a name="cfn-ecs-taskdefinition-cpu"></a>
The number of `cpu` units used by the task. If you use the EC2 launch type, this field is optional. Any value can be used. If you use the Fargate launch type, this field is required. You must use one of the following values. The value that you choose determines your range of valid values for the `memory` parameter.  
If you're using the EC2 launch type or the external launch type, this field is optional. Supported values are between `128` CPU units (`0.125` vCPUs) and `196608` CPU units (`192` vCPUs).   
This field is required for Fargate. For information about the valid values, see [Task size](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_size) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EnableFaultInjection`  <a name="cfn-ecs-taskdefinition-enablefaultinjection"></a>
Enables fault injection and allows for fault injection requests to be accepted from the task's containers. The default value is `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EphemeralStorage`  <a name="cfn-ecs-taskdefinition-ephemeralstorage"></a>
The ephemeral storage settings to use for tasks run with the task definition.  
*Required*: No  
*Type*: [EphemeralStorage](aws-properties-ecs-taskdefinition-ephemeralstorage.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ExecutionRoleArn`  <a name="cfn-ecs-taskdefinition-executionrolearn"></a>
The Amazon Resource Name (ARN) of the task execution role that grants the Amazon ECS container agent permission to make AWS API calls on your behalf. For informationabout the required IAM roles for Amazon ECS, see [IAM roles for Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/security-ecs-iam-role-overview.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Family`  <a name="cfn-ecs-taskdefinition-family"></a>
The name of a family that this task definition is registered to. Up to 255 letters (uppercase and lowercase), numbers, hyphens, and underscores are allowed.  
A family groups multiple versions of a task definition. Amazon ECS gives the first task definition that you registered to a family a revision number of 1. Amazon ECS gives sequential revision numbers to each task definition that you add.  
To use revision numbers when you update a task definition, specify this property. If you don't specify a value, AWS CloudFormation generates a new task definition each time that you update it.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`IpcMode`  <a name="cfn-ecs-taskdefinition-ipcmode"></a>
The IPC resource namespace to use for the containers in the task. The valid values are `host`, `task`, or `none`. If `host` is specified, then all containers within the tasks that specified the `host` IPC mode on the same container instance share the same IPC resources with the host Amazon EC2 instance. If `task` is specified, all containers within the specified task share the same IPC resources. If `none` is specified, then IPC resources within the containers of a task are private and not shared with other containers in a task or on the container instance. If no value is specified, then the IPC resource namespace sharing depends on the Docker daemon setting on the container instance.  
If the `host` IPC mode is used, be aware that there is a heightened risk of undesired IPC namespace expose.  
If you are setting namespaced kernel parameters using `systemControls` for the containers in the task, the following will apply to your IPC resource namespace. For more information, see [System Controls](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html) in the *Amazon Elastic Container Service Developer Guide*.  
+ For tasks that use the `host` IPC mode, IPC namespace related `systemControls` are not supported.
+ For tasks that use the `task` IPC mode, IPC namespace related `systemControls` will apply to all containers within a task.
This parameter is not supported for Windows containers or tasks run on AWS Fargate.
*Required*: No  
*Type*: String  
*Allowed values*: `host | task | none`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Memory`  <a name="cfn-ecs-taskdefinition-memory"></a>
The amount (in MiB) of memory used by the task.  
If your tasks runs on Amazon EC2 instances, you must specify either a task-level memory value or a container-level memory value. This field is optional and any value can be used. If a task-level memory value is specified, the container-level memory value is optional. For more information regarding container-level memory and memory reservation, see [ContainerDefinition](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ContainerDefinition.html).  
If your tasks runs on AWS Fargate, this field is required. You must use one of the following values. The value you choose determines your range of valid values for the `cpu` parameter.  
+ 512 (0.5 GB), 1024 (1 GB), 2048 (2 GB) - Available `cpu` values: 256 (.25 vCPU)
+ 1024 (1 GB), 2048 (2 GB), 3072 (3 GB), 4096 (4 GB) - Available `cpu` values: 512 (.5 vCPU)
+ 2048 (2 GB), 3072 (3 GB), 4096 (4 GB), 5120 (5 GB), 6144 (6 GB), 7168 (7 GB), 8192 (8 GB) - Available `cpu` values: 1024 (1 vCPU)
+ Between 4096 (4 GB) and 16384 (16 GB) in increments of 1024 (1 GB) - Available `cpu` values: 2048 (2 vCPU)
+ Between 8192 (8 GB) and 30720 (30 GB) in increments of 1024 (1 GB) - Available `cpu` values: 4096 (4 vCPU)
+ Between 16 GB and 60 GB in 4 GB increments - Available `cpu` values: 8192 (8 vCPU)

  This option requires Linux platform `1.4.0` or later.
+ Between 32GB and 120 GB in 8 GB increments - Available `cpu` values: 16384 (16 vCPU)

  This option requires Linux platform `1.4.0` or later.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`NetworkMode`  <a name="cfn-ecs-taskdefinition-networkmode"></a>
The Docker networking mode to use for the containers in the task. The valid values are `none`, `bridge`, `awsvpc`, and `host`. If no network mode is specified, the default is `bridge`.  
For Amazon ECS tasks on Fargate, the `awsvpc` network mode is required. For Amazon ECS tasks on Amazon EC2 Linux instances, any network mode can be used. For Amazon ECS tasks on Amazon EC2 Windows instances, `<default>` or `awsvpc` can be used. If the network mode is set to `none`, you cannot specify port mappings in your container definitions, and the tasks containers do not have external connectivity. The `host` and `awsvpc` network modes offer the highest networking performance for containers because they use the EC2 network stack instead of the virtualized network stack provided by the `bridge` mode.  
With the `host` and `awsvpc` network modes, exposed container ports are mapped directly to the corresponding host port (for the `host` network mode) or the attached elastic network interface port (for the `awsvpc` network mode), so you cannot take advantage of dynamic host port mappings.   
When using the `host` network mode, you should not run containers using the root user (UID 0). It is considered best practice to use a non-root user.
If the network mode is `awsvpc`, the task is allocated an elastic network interface, and you must specify a [NetworkConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_NetworkConfiguration.html) value when you create a service or run a task with the task definition. For more information, see [Task Networking](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-networking.html) in the *Amazon Elastic Container Service Developer Guide*.  
If the network mode is `host`, you cannot run multiple instantiations of the same task on a single container instance when port mappings are used.  
*Required*: No  
*Type*: String  
*Allowed values*: `bridge | host | awsvpc | none`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PidMode`  <a name="cfn-ecs-taskdefinition-pidmode"></a>
The process namespace to use for the containers in the task. The valid values are `host` or `task`. On Fargate for Linux containers, the only valid value is `task`. For example, monitoring sidecars might need `pidMode` to access information about other containers running in the same task.  
If `host` is specified, all containers within the tasks that specified the `host` PID mode on the same container instance share the same process namespace with the host Amazon EC2 instance.  
If `task` is specified, all containers within the specified task share the same process namespace.  
If no value is specified, the The default is a private namespace for each container.  
If the `host` PID mode is used, there's a heightened risk of undesired process namespace exposure.  
This parameter is not supported for Windows containers.
This parameter is only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version `1.4.0` or later (Linux). This isn't supported for Windows containers on Fargate.
*Required*: No  
*Type*: String  
*Allowed values*: `host | task`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PlacementConstraints`  <a name="cfn-ecs-taskdefinition-placementconstraints"></a>
An array of placement constraint objects to use for tasks.  
This parameter isn't supported for tasks run on AWS Fargate.
*Required*: No  
*Type*: Array of [TaskDefinitionPlacementConstraint](aws-properties-ecs-taskdefinition-taskdefinitionplacementconstraint.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ProxyConfiguration`  <a name="cfn-ecs-taskdefinition-proxyconfiguration"></a>
The configuration details for the App Mesh proxy.  
Your Amazon ECS container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the `ecs-init` package to use a proxy configuration. If your container instances are launched from the Amazon ECS optimized AMI version `20190301` or later, they contain the required versions of the container agent and `ecs-init`. For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: [ProxyConfiguration](aws-properties-ecs-taskdefinition-proxyconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RequiresCompatibilities`  <a name="cfn-ecs-taskdefinition-requirescompatibilities"></a>
The task launch types the task definition was validated against. The valid values are `MANAGED_INSTANCES`, `EC2`, `FARGATE`, and `EXTERNAL`. For more information, see [Amazon ECS launch types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RuntimePlatform`  <a name="cfn-ecs-taskdefinition-runtimeplatform"></a>
The operating system that your tasks definitions run on.  
*Required*: No  
*Type*: [RuntimePlatform](aws-properties-ecs-taskdefinition-runtimeplatform.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-ecs-taskdefinition-tags"></a>
The metadata that you apply to the task definition to help you categorize and organize them. Each tag consists of a key and an optional value. You define both of them.  
The following basic restrictions apply to tags:  
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
*Required*: No  
*Type*: Array of [Tag](aws-properties-ecs-taskdefinition-tag.md)  
*Minimum*: `0`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TaskRoleArn`  <a name="cfn-ecs-taskdefinition-taskrolearn"></a>
The short name or full Amazon Resource Name (ARN) of the AWS Identity and Access Management role that grants containers in the task permission to call AWS APIs on your behalf. For more information, see [Amazon ECS Task Role](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html) in the *Amazon Elastic Container Service Developer Guide*.  
IAM roles for tasks on Windows require that the `-EnableTaskIAMRole` option is set when you launch the Amazon ECS-optimized Windows AMI. Your containers must also run some configuration code to use the feature. For more information, see [Windows IAM roles for tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows_task_IAM_roles.html) in the *Amazon Elastic Container Service Developer Guide*.  
String validation is done on the ECS side. If an invalid string value is given for `TaskRoleArn`, it may cause the Cloudformation job to hang.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Volumes`  <a name="cfn-ecs-taskdefinition-volumes"></a>
The list of data volume definitions for the task. For more information, see [Using data volumes in tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html) in the *Amazon Elastic Container Service Developer Guide*.  
The `host` and `sourcePath` parameters aren't supported for tasks run on AWS Fargate. 
*Required*: No  
*Type*: Array of [Volume](aws-properties-ecs-taskdefinition-volume.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-ecs-taskdefinition-return-values"></a>

### Ref
<a name="aws-resource-ecs-taskdefinition-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the Amazon Resource Name (ARN).

In the following example, the `Ref` function returns the ARN of the `MyTaskDefinition` task definition, such as `arn:aws:ecs:us-west-2:123456789012:task-definition/TaskDefinitionFamily:1`.

 `{ "Ref": "MyTaskDefinition" }` 

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-ecs-taskdefinition-return-values-fn--getatt"></a>

#### 
<a name="aws-resource-ecs-taskdefinition-return-values-fn--getatt-fn--getatt"></a>

`TaskDefinitionArn`  <a name="TaskDefinitionArn-fn::getatt"></a>
The ARN of the task definition.

## Examples
<a name="aws-resource-ecs-taskdefinition--examples"></a>



**Topics**
+ [Create a task definition with 2 containers](#aws-resource-ecs-taskdefinition--examples--Create_a_task_definition_with_2_containers)
+ [Create a task definition that can be used for both the Fargate and the EC2 launch types](#aws-resource-ecs-taskdefinition--examples--Create_a_task_definition_that_can_be_used_for_both_the_Fargate_and_the_EC2_launch_types)
+ [Create an Amazon ECS task definition with an Amazon EFS volume](#aws-resource-ecs-taskdefinition--examples--Create_an_task_definition_with_an_volume)

### Create a task definition with 2 containers
<a name="aws-resource-ecs-taskdefinition--examples--Create_a_task_definition_with_2_containers"></a>

The following example defines an Amazon ECS task definition, which includes two container definitions and one volume definition.

#### JSON
<a name="aws-resource-ecs-taskdefinition--examples--Create_a_task_definition_with_2_containers--json"></a>

```
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Resources": {
    "taskdefinition": {
      "Type": "AWS::ECS::TaskDefinition",
      "Properties": {
        "ContainerDefinitions": [
          {
            "Name": "AppName",
            "MountPoints": [
              {
                "SourceVolume": "my-vol",
                "ContainerPath": "/var/www/my-vol"
              }
            ],
            "Image": "amazon/amazon-ecs-sample",
            "Cpu": 256,
            "PortMappings": [
              {
                "ContainerPort": 80,
                "HostPort": 80,
                "Protocol": "tcp"
              }
            ],
            "EntryPoint": ["/usr/sbin/apache2", "-D", "FOREGROUND"],
            "Memory": 512,
            "Essential": true
          },
          {
            "Name": "busybox",
            "Image": "busybox",
            "Cpu": 256,
            "EntryPoint": ["sh", "-c"],
            "Memory": 512,
            "Command": [
              "/bin/sh -c \"while true; do /bin/date > /var/www/my-vol/date; sleep 1; done\""
            ],
            "Essential": false,
            "VolumesFrom": [
              {
                "SourceContainer": "AppName"
              }
            ]
          }
        ],
        "Volumes": [
          {
            "Host": {
              "SourcePath": "/var/lib/docker/vfs/dir/"
            },
            "Name": "my-vol"
          }
        ]
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-ecs-taskdefinition--examples--Create_a_task_definition_with_2_containers--yaml"></a>

```
AWSTemplateFormatVersion: "2010-09-09"
Resources:
  taskdefinition:
    Type: AWS::ECS::TaskDefinition
    Properties:
      ContainerDefinitions:
        - Name: AppName
          MountPoints:
            - SourceVolume: my-vol
              ContainerPath: "/var/www/my-vol"
          Image: amazon/amazon-ecs-sample
          Cpu: 256
          PortMappings:
            - ContainerPort: 80
              HostPort: 80
              Protocol: tcp
          EntryPoint:
            - "/usr/sbin/apache2"
            - "-D"
            - FOREGROUND
          Memory: 512
          Essential: true
        - Name: busybox
          Image: busybox
          Cpu: 256
          EntryPoint:
            - sh
            - "-c"
          Memory: 512
          Command:
            - "/bin/sh"
            - "-c"
            - "while true; do /bin/date > /var/www/my-vol/date; sleep 1; done"
          Essential: false
          VolumesFrom:
            - SourceContainer: AppName
      Volumes:
        - Host:
            SourcePath: "/var/lib/docker/vfs/dir/"
          Name: my-vol
```

### Create a task definition that can be used for both the Fargate and the EC2 launch types
<a name="aws-resource-ecs-taskdefinition--examples--Create_a_task_definition_that_can_be_used_for_both_the_Fargate_and_the_EC2_launch_types"></a>

The following is an example task definition using a Linux container that sets up a web server and is tagged with the key `environment` and the value `webserver`. This task definition is compatible across both the Fargate and EC2 launch types.

#### JSON
<a name="aws-resource-ecs-taskdefinition--examples--Create_a_task_definition_that_can_be_used_for_both_the_Fargate_and_the_EC2_launch_types--json"></a>

```
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Description": "Create a task definition for a web server.",
  "Resources": {
    "ECSTaskDefinition": {
      "Type": "AWS::ECS::TaskDefinition",
      "Properties": {
        "ContainerDefinitions": [
          {
            "Name": "first-run-task",
            "Image": "public.ecr.aws/docker/library/httpd:2.4",
            "Essential": true,
            "PortMappings": [
              {
                "ContainerPort": 80,
                "Protocol": "tcp"
              }
            ],
             "EntryPoint": ["sh", "-c"],
             "Command":[
              "/bin/sh -c \"echo '<html> <head> <title>Amazon ECS Sample App</title> <style>body {margin-top: 40px; background-color: #333;} </style> </head><body> <div style=color:white;text-align:center> <h1>Amazon ECS Sample App</h1> <h2>Congratulations!</h2> <p>Your application is now running on a container in Amazon ECS.</p> </div></body></html>' >  /usr/local/apache2/htdocs/index.html && httpd-foreground\""
            ]
          }
        ],
        "Family": "first-run-task",
        "Cpu": "1 vCPU",
        "Memory": "3 GB",
        "NetworkMode": "awsvpc",
        "RequiresCompatibilities": ["EC2","FARGATE"],
         "Tags": [
            {
                "Key": "environment",
                "Value": "webserver"
            }
        ]
      }
    }
  },
  "Outputs": {
    "ECSTaskDefinition": {
      "Description": "The created Taskdefinition.",
      "Value": {
        "Ref": "ECSTaskDefinition"
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-ecs-taskdefinition--examples--Create_a_task_definition_that_can_be_used_for_both_the_Fargate_and_the_EC2_launch_types--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Description: Create a task definition for a web server.
Resources:
  ECSTaskDefinition:
    Type: 'AWS::ECS::TaskDefinition'
    Properties:
      ContainerDefinitions:
        - Name: first-run-task
          Image: 'public.ecr.aws/docker/library/httpd:2.4'
          Essential: true
          PortMappings:
            - ContainerPort: 80
              Protocol: tcp
          EntryPoint:
            - sh
            - -c
          Command:
            -   "/bin/sh -c \"echo '<html> <head> <title>Amazon ECS Sample
                App</title> <style>body {margin-top: 40px; background-color:
                #333;} </style> </head><body> <div
                style=color:white;text-align:center> <h1>Amazon ECS Sample
                App</h1> <h2>Congratulations!</h2> <p>Your application is now
                running on a container in Amazon ECS.</p> </div></body></html>'
                >  /usr/local/apache2/htdocs/index.html && httpd-foreground\""
      Family: first-run-task
      Cpu: 1 vCPU
      Memory: 3 GB
      NetworkMode: awsvpc
      RequiresCompatibilities:
        - EC2
        - FARGATE
      Tags:
        - Key: environment
          Value: webserver
Outputs:
  ECSTaskDefinition:
    Description: The created Taskdefinition.
    Value: !Ref ECSTaskDefinition
```

### Create an Amazon ECS task definition with an Amazon EFS volume
<a name="aws-resource-ecs-taskdefinition--examples--Create_an_task_definition_with_an_volume"></a>

The following example defines an Amazon ECS task definition that uses an Amazon EFS volume. Replace the `ExecutionRoleArn` and `FileSystemId` with your own values. For more information about using Amazon EFS volumes with Amazon ECS, see [Use Amazon EFS volumes with Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html) in the *Amazon ECS Developer Guide*.

#### JSON
<a name="aws-resource-ecs-taskdefinition--examples--Create_an_task_definition_with_an_volume--json"></a>

```
{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Description": "Create a task definition for a web server.",
    "Resources": {
      "ECSTaskDefinition": {
        "Type": "AWS::ECS::TaskDefinition",
        "Properties": {
          "ExecutionRoleArn": "arn:aws:iam::123456789012:role/ecsTaskExecutionRole",
          "NetworkMode": "awsvpc",
          "RequiresCompatibilities": ["FARGATE"],
          "Family": "my-ecs-task",
          "Cpu": "256",
          "Memory": "512",
          "ContainerDefinitions": [
            {
              "Name": "nginx",
              "Image": "public.ecr.aws/nginx/nginx:latest",
              "Essential": true,
              "PortMappings": [
                {
                  "ContainerPort": 80,
                  "Protocol": "tcp"
                }
              ],
              "LinuxParameters": {
                "InitProcessEnabled": true
              },
              "MountPoints": [
                {
                  "SourceVolume": "efs-volume",
                  "ContainerPath": "/usr/share/nginx/html"
                }
            ],
                "LogConfiguration": {
                  "LogDriver": "awslogs",
                    "Options": {
                      "mode": "non-blocking",
                      "max-buffer-size": "25m",
                      "awslogs-group": "LogGroup",
                      "awslogs-region": "us-east-1",
                      "awslogs-create-group": "true",
                      "awslogs-stream-prefix": "efs-task"
                    }
                }
            }
        ],
          "Volumes": [
            {
              "Name": "efs-volume",
              "EFSVolumeConfiguration": {
                "FilesystemId": "fs-1234567890abcdef0",
                "RootDirectory": "/",
                "TransitEncryption": "ENABLED"
              }
          }
        ]
        }
      }
    }
  }
```

#### YAML
<a name="aws-resource-ecs-taskdefinition--examples--Create_an_task_definition_with_an_volume--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Description: Create a task definition for a web server.
Resources:
  ECSTaskDefinition:
    Type: AWS::ECS::TaskDefinition
    Properties:
      ExecutionRoleArn: arn:aws:iam::123456789012:role/ecsTaskExecutionRole
      NetworkMode: awsvpc
      RequiresCompatibilities:
        - FARGATE
      Family: my-ecs-task
      Cpu: "256"
      Memory: "512"
      ContainerDefinitions:
        - Name: nginx
          Image: public.ecr.aws/nginx/nginx:latest
          Essential: true
          PortMappings:
            - ContainerPort: 80
              Protocol: tcp
          LinuxParameters:
            InitProcessEnabled: true
          MountPoints:
            - SourceVolume: efs-volume
              ContainerPath: /usr/share/nginx/html
          LogConfiguration:
            LogDriver: awslogs
            Options:
              mode: non-blocking
              max-buffer-size: 25m
              awslogs-group: LogGroup
              awslogs-region: us-east-1
              awslogs-create-group: "true"
              awslogs-stream-prefix: efs-task
      Volumes:
        - Name: efs-volume
          EFSVolumeConfiguration:
            FilesystemId: fs-1234567890abcdef0
            RootDirectory: /
            TransitEncryption: ENABLED
```

# AWS::ECS::TaskDefinition AuthorizationConfig
<a name="aws-properties-ecs-taskdefinition-authorizationconfig"></a>

The authorization configuration details for the Amazon EFS file system.

## Syntax
<a name="aws-properties-ecs-taskdefinition-authorizationconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-authorizationconfig-syntax.json"></a>

```
{
  "[AccessPointId](#cfn-ecs-taskdefinition-authorizationconfig-accesspointid)" : String,
  "[IAM](#cfn-ecs-taskdefinition-authorizationconfig-iam)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-authorizationconfig-syntax.yaml"></a>

```
  [AccessPointId](#cfn-ecs-taskdefinition-authorizationconfig-accesspointid): String
  [IAM](#cfn-ecs-taskdefinition-authorizationconfig-iam): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-authorizationconfig-properties"></a>

`AccessPointId`  <a name="cfn-ecs-taskdefinition-authorizationconfig-accesspointid"></a>
The Amazon EFS access point ID to use. If an access point is specified, the root directory value specified in the `EFSVolumeConfiguration` must either be omitted or set to `/` which will enforce the path set on the EFS access point. If an access point is used, transit encryption must be on in the `EFSVolumeConfiguration`. For more information, see [Working with Amazon EFS access points](https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html) in the *Amazon Elastic File System User Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`IAM`  <a name="cfn-ecs-taskdefinition-authorizationconfig-iam"></a>
Determines whether to use the Amazon ECS task role defined in a task definition when mounting the Amazon EFS file system. If it is turned on, transit encryption must be turned on in the `EFSVolumeConfiguration`. If this parameter is omitted, the default value of `DISABLED` is used. For more information, see [Using Amazon EFS access points](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html#efs-volume-accesspoints) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: String  
*Allowed values*: `ENABLED | DISABLED`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition ContainerDefinition
<a name="aws-properties-ecs-taskdefinition-containerdefinition"></a>

The `ContainerDefinition` property specifies a container definition. Container definitions are used in task definitions to describe the different containers that are launched as part of a task.

## Syntax
<a name="aws-properties-ecs-taskdefinition-containerdefinition-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-containerdefinition-syntax.json"></a>

```
{
  "[Command](#cfn-ecs-taskdefinition-containerdefinition-command)" : [ String, ... ],
  "[Cpu](#cfn-ecs-taskdefinition-containerdefinition-cpu)" : Integer,
  "[CredentialSpecs](#cfn-ecs-taskdefinition-containerdefinition-credentialspecs)" : [ String, ... ],
  "[DependsOn](#cfn-ecs-taskdefinition-containerdefinition-dependson)" : [ ContainerDependency, ... ],
  "[DisableNetworking](#cfn-ecs-taskdefinition-containerdefinition-disablenetworking)" : Boolean,
  "[DnsSearchDomains](#cfn-ecs-taskdefinition-containerdefinition-dnssearchdomains)" : [ String, ... ],
  "[DnsServers](#cfn-ecs-taskdefinition-containerdefinition-dnsservers)" : [ String, ... ],
  "[DockerLabels](#cfn-ecs-taskdefinition-containerdefinition-dockerlabels)" : {Key: Value, ...},
  "[DockerSecurityOptions](#cfn-ecs-taskdefinition-containerdefinition-dockersecurityoptions)" : [ String, ... ],
  "[EntryPoint](#cfn-ecs-taskdefinition-containerdefinition-entrypoint)" : [ String, ... ],
  "[Environment](#cfn-ecs-taskdefinition-containerdefinition-environment)" : [ KeyValuePair, ... ],
  "[EnvironmentFiles](#cfn-ecs-taskdefinition-containerdefinition-environmentfiles)" : [ EnvironmentFile, ... ],
  "[Essential](#cfn-ecs-taskdefinition-containerdefinition-essential)" : Boolean,
  "[ExtraHosts](#cfn-ecs-taskdefinition-containerdefinition-extrahosts)" : [ HostEntry, ... ],
  "[FirelensConfiguration](#cfn-ecs-taskdefinition-containerdefinition-firelensconfiguration)" : FirelensConfiguration,
  "[HealthCheck](#cfn-ecs-taskdefinition-containerdefinition-healthcheck)" : HealthCheck,
  "[Hostname](#cfn-ecs-taskdefinition-containerdefinition-hostname)" : String,
  "[Image](#cfn-ecs-taskdefinition-containerdefinition-image)" : String,
  "[Interactive](#cfn-ecs-taskdefinition-containerdefinition-interactive)" : Boolean,
  "[Links](#cfn-ecs-taskdefinition-containerdefinition-links)" : [ String, ... ],
  "[LinuxParameters](#cfn-ecs-taskdefinition-containerdefinition-linuxparameters)" : LinuxParameters,
  "[LogConfiguration](#cfn-ecs-taskdefinition-containerdefinition-logconfiguration)" : LogConfiguration,
  "[Memory](#cfn-ecs-taskdefinition-containerdefinition-memory)" : Integer,
  "[MemoryReservation](#cfn-ecs-taskdefinition-containerdefinition-memoryreservation)" : Integer,
  "[MountPoints](#cfn-ecs-taskdefinition-containerdefinition-mountpoints)" : [ MountPoint, ... ],
  "[Name](#cfn-ecs-taskdefinition-containerdefinition-name)" : String,
  "[PortMappings](#cfn-ecs-taskdefinition-containerdefinition-portmappings)" : [ PortMapping, ... ],
  "[Privileged](#cfn-ecs-taskdefinition-containerdefinition-privileged)" : Boolean,
  "[PseudoTerminal](#cfn-ecs-taskdefinition-containerdefinition-pseudoterminal)" : Boolean,
  "[ReadonlyRootFilesystem](#cfn-ecs-taskdefinition-containerdefinition-readonlyrootfilesystem)" : Boolean,
  "[RepositoryCredentials](#cfn-ecs-taskdefinition-containerdefinition-repositorycredentials)" : RepositoryCredentials,
  "[ResourceRequirements](#cfn-ecs-taskdefinition-containerdefinition-resourcerequirements)" : [ ResourceRequirement, ... ],
  "[RestartPolicy](#cfn-ecs-taskdefinition-containerdefinition-restartpolicy)" : RestartPolicy,
  "[Secrets](#cfn-ecs-taskdefinition-containerdefinition-secrets)" : [ Secret, ... ],
  "[StartTimeout](#cfn-ecs-taskdefinition-containerdefinition-starttimeout)" : Integer,
  "[StopTimeout](#cfn-ecs-taskdefinition-containerdefinition-stoptimeout)" : Integer,
  "[SystemControls](#cfn-ecs-taskdefinition-containerdefinition-systemcontrols)" : [ SystemControl, ... ],
  "[Ulimits](#cfn-ecs-taskdefinition-containerdefinition-ulimits)" : [ Ulimit, ... ],
  "[User](#cfn-ecs-taskdefinition-containerdefinition-user)" : String,
  "[VersionConsistency](#cfn-ecs-taskdefinition-containerdefinition-versionconsistency)" : String,
  "[VolumesFrom](#cfn-ecs-taskdefinition-containerdefinition-volumesfrom)" : [ VolumeFrom, ... ],
  "[WorkingDirectory](#cfn-ecs-taskdefinition-containerdefinition-workingdirectory)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-containerdefinition-syntax.yaml"></a>

```
  [Command](#cfn-ecs-taskdefinition-containerdefinition-command): 
    - String
  [Cpu](#cfn-ecs-taskdefinition-containerdefinition-cpu): Integer
  [CredentialSpecs](#cfn-ecs-taskdefinition-containerdefinition-credentialspecs): 
    - String
  [DependsOn](#cfn-ecs-taskdefinition-containerdefinition-dependson): 
    - ContainerDependency
  [DisableNetworking](#cfn-ecs-taskdefinition-containerdefinition-disablenetworking): Boolean
  [DnsSearchDomains](#cfn-ecs-taskdefinition-containerdefinition-dnssearchdomains): 
    - String
  [DnsServers](#cfn-ecs-taskdefinition-containerdefinition-dnsservers): 
    - String
  [DockerLabels](#cfn-ecs-taskdefinition-containerdefinition-dockerlabels): 
    Key: Value
  [DockerSecurityOptions](#cfn-ecs-taskdefinition-containerdefinition-dockersecurityoptions): 
    - String
  [EntryPoint](#cfn-ecs-taskdefinition-containerdefinition-entrypoint): 
    - String
  [Environment](#cfn-ecs-taskdefinition-containerdefinition-environment): 
    - KeyValuePair
  [EnvironmentFiles](#cfn-ecs-taskdefinition-containerdefinition-environmentfiles): 
    - EnvironmentFile
  [Essential](#cfn-ecs-taskdefinition-containerdefinition-essential): Boolean
  [ExtraHosts](#cfn-ecs-taskdefinition-containerdefinition-extrahosts): 
    - HostEntry
  [FirelensConfiguration](#cfn-ecs-taskdefinition-containerdefinition-firelensconfiguration): 
    FirelensConfiguration
  [HealthCheck](#cfn-ecs-taskdefinition-containerdefinition-healthcheck): 
    HealthCheck
  [Hostname](#cfn-ecs-taskdefinition-containerdefinition-hostname): String
  [Image](#cfn-ecs-taskdefinition-containerdefinition-image): String
  [Interactive](#cfn-ecs-taskdefinition-containerdefinition-interactive): Boolean
  [Links](#cfn-ecs-taskdefinition-containerdefinition-links): 
    - String
  [LinuxParameters](#cfn-ecs-taskdefinition-containerdefinition-linuxparameters): 
    LinuxParameters
  [LogConfiguration](#cfn-ecs-taskdefinition-containerdefinition-logconfiguration): 
    LogConfiguration
  [Memory](#cfn-ecs-taskdefinition-containerdefinition-memory): Integer
  [MemoryReservation](#cfn-ecs-taskdefinition-containerdefinition-memoryreservation): Integer
  [MountPoints](#cfn-ecs-taskdefinition-containerdefinition-mountpoints): 
    - MountPoint
  [Name](#cfn-ecs-taskdefinition-containerdefinition-name): String
  [PortMappings](#cfn-ecs-taskdefinition-containerdefinition-portmappings): 
    - PortMapping
  [Privileged](#cfn-ecs-taskdefinition-containerdefinition-privileged): Boolean
  [PseudoTerminal](#cfn-ecs-taskdefinition-containerdefinition-pseudoterminal): Boolean
  [ReadonlyRootFilesystem](#cfn-ecs-taskdefinition-containerdefinition-readonlyrootfilesystem): Boolean
  [RepositoryCredentials](#cfn-ecs-taskdefinition-containerdefinition-repositorycredentials): 
    RepositoryCredentials
  [ResourceRequirements](#cfn-ecs-taskdefinition-containerdefinition-resourcerequirements): 
    - ResourceRequirement
  [RestartPolicy](#cfn-ecs-taskdefinition-containerdefinition-restartpolicy): 
    RestartPolicy
  [Secrets](#cfn-ecs-taskdefinition-containerdefinition-secrets): 
    - Secret
  [StartTimeout](#cfn-ecs-taskdefinition-containerdefinition-starttimeout): Integer
  [StopTimeout](#cfn-ecs-taskdefinition-containerdefinition-stoptimeout): Integer
  [SystemControls](#cfn-ecs-taskdefinition-containerdefinition-systemcontrols): 
    - SystemControl
  [Ulimits](#cfn-ecs-taskdefinition-containerdefinition-ulimits): 
    - Ulimit
  [User](#cfn-ecs-taskdefinition-containerdefinition-user): String
  [VersionConsistency](#cfn-ecs-taskdefinition-containerdefinition-versionconsistency): String
  [VolumesFrom](#cfn-ecs-taskdefinition-containerdefinition-volumesfrom): 
    - VolumeFrom
  [WorkingDirectory](#cfn-ecs-taskdefinition-containerdefinition-workingdirectory): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-containerdefinition-properties"></a>

`Command`  <a name="cfn-ecs-taskdefinition-containerdefinition-command"></a>
The command that's passed to the container. This parameter maps to `Cmd` in the docker container create command and the `COMMAND` parameter to docker run. If there are multiple arguments, each argument is a separated string in the array.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Cpu`  <a name="cfn-ecs-taskdefinition-containerdefinition-cpu"></a>
The number of `cpu` units reserved for the container. This parameter maps to `CpuShares` in the docker container create command and the `--cpu-shares` option to docker run.  
This field is optional for tasks using the Fargate launch type, and the only requirement is that the total amount of CPU reserved for all containers within a task be lower than the task-level `cpu` value.  
You can determine the number of CPU units that are available per EC2 instance type by multiplying the vCPUs listed for that instance type on the [Amazon EC2 Instances](https://aws.amazon.com/ec2/instance-types/) detail page by 1,024.
Linux containers share unallocated CPU units with other containers on the container instance with the same ratio as their allocated amount. For example, if you run a single-container task on a single-core instance type with 512 CPU units specified for that container, and that's the only task running on the container instance, that container could use the full 1,024 CPU unit share at any given time. However, if you launched another copy of the same task on that container instance, each task is guaranteed a minimum of 512 CPU units when needed. Moreover, each container could float to higher CPU usage if the other container was not using it. If both tasks were 100% active all of the time, they would be limited to 512 CPU units.  
On Linux container instances, the Docker daemon on the container instance uses the CPU value to calculate the relative CPU share ratios for running containers. The minimum valid CPU share value that the Linux kernel allows is 2, and the maximum valid CPU share value that the Linux kernel allows is 262144. However, the CPU parameter isn't required, and you can use CPU values below 2 or above 262144 in your container definitions. For CPU values below 2 (including null) or above 262144, the behavior varies based on your Amazon ECS container agent version:  
+ **Agent versions less than or equal to 1.1.0:** Null and zero CPU values are passed to Docker as 0, which Docker then converts to 1,024 CPU shares. CPU values of 1 are passed to Docker as 1, which the Linux kernel converts to two CPU shares.
+ **Agent versions greater than or equal to 1.2.0:** Null, zero, and CPU values of 1 are passed to Docker as 2.
+ **Agent versions greater than or equal to 1.84.0:** CPU values greater than 256 vCPU are passed to Docker as 256, which is equivalent to 262144 CPU shares.
On Windows container instances, the CPU limit is enforced as an absolute limit, or a quota. Windows containers only have access to the specified amount of CPU that's described in the task definition. A null or zero CPU value is passed to Docker as `0`, which Windows interprets as 1% of one CPU.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CredentialSpecs`  <a name="cfn-ecs-taskdefinition-containerdefinition-credentialspecs"></a>
A list of ARNs in SSM or Amazon S3 to a credential spec (`CredSpec`) file that configures the container for Active Directory authentication. We recommend that you use this parameter instead of the `dockerSecurityOptions`. The maximum number of ARNs is 1.  
There are two formats for each ARN.    
credentialspecdomainless:MyARN  
You use `credentialspecdomainless:MyARN` to provide a `CredSpec` with an additional section for a secret in AWS Secrets Manager. You provide the login credentials to the domain in the secret.  
Each task that runs on any container instance can join different domains.  
You can use this format without joining the container instance to a domain.  
credentialspec:MyARN  
You use `credentialspec:MyARN` to provide a `CredSpec` for a single domain.  
You must join the container instance to the domain before you start any tasks that use this task definition.
In both formats, replace `MyARN` with the ARN in SSM or Amazon S3.  
If you provide a `credentialspecdomainless:MyARN`, the `credspec` must provide a ARN in AWS Secrets Manager for a secret containing the username, password, and the domain to connect to. For better security, the instance isn't joined to the domain for domainless authentication. Other applications on the instance can't use the domainless credentials. You can use this parameter to run tasks on the same instance, even it the tasks need to join different domains. For more information, see [Using gMSAs for Windows Containers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows-gmsa.html) and [Using gMSAs for Linux Containers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/linux-gmsa.html).  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DependsOn`  <a name="cfn-ecs-taskdefinition-containerdefinition-dependson"></a>
The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed.  
For tasks using the EC2 launch type, the container instances require at least version 1.26.0 of the container agent to turn on container dependencies. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) in the *Amazon Elastic Container Service Developer Guide*. If you're using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the `ecs-init` package. If your container instances are launched from version `20190301` or later, then they contain the required versions of the container agent and `ecs-init`. For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide*.  
For tasks using the Fargate launch type, the task or service requires the following platforms:  
+ Linux platform version `1.3.0` or later.
+ Windows platform version `1.0.0` or later.
If the task definition is used in a blue/green deployment that uses [AWS::CodeDeploy::DeploymentGroup BlueGreenDeploymentConfiguration](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codedeploy-deploymentgroup-bluegreendeploymentconfiguration.html), the `dependsOn` parameter is not supported.  
*Required*: No  
*Type*: Array of [ContainerDependency](aws-properties-ecs-taskdefinition-containerdependency.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DisableNetworking`  <a name="cfn-ecs-taskdefinition-containerdefinition-disablenetworking"></a>
When this parameter is true, networking is off within the container. This parameter maps to `NetworkDisabled` in the docker container create command.  
This parameter is not supported for Windows containers.
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DnsSearchDomains`  <a name="cfn-ecs-taskdefinition-containerdefinition-dnssearchdomains"></a>
A list of DNS search domains that are presented to the container. This parameter maps to `DnsSearch` in the docker container create command and the `--dns-search` option to docker run.  
This parameter is not supported for Windows containers.
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DnsServers`  <a name="cfn-ecs-taskdefinition-containerdefinition-dnsservers"></a>
A list of DNS servers that are presented to the container. This parameter maps to `Dns` in the docker container create command and the `--dns` option to docker run.  
This parameter is not supported for Windows containers.
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DockerLabels`  <a name="cfn-ecs-taskdefinition-containerdefinition-dockerlabels"></a>
A key/value map of labels to add to the container. This parameter maps to `Labels` in the docker container create command and the `--label` option to docker run. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`  
*Required*: No  
*Type*: Object of String  
*Pattern*: `.{1,}`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DockerSecurityOptions`  <a name="cfn-ecs-taskdefinition-containerdefinition-dockersecurityoptions"></a>
A list of strings to provide custom configuration for multiple security systems. This field isn't valid for containers in tasks using the Fargate launch type.  
For Linux tasks on EC2, this parameter can be used to reference custom labels for SELinux and AppArmor multi-level security systems.  
For any tasks on EC2, this parameter can be used to reference a credential spec file that configures a container for Active Directory authentication. For more information, see [Using gMSAs for Windows Containers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/windows-gmsa.html) and [Using gMSAs for Linux Containers](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/linux-gmsa.html) in the *Amazon Elastic Container Service Developer Guide*.  
This parameter maps to `SecurityOpt` in the docker container create command and the `--security-opt` option to docker run.  
The Amazon ECS container agent running on a container instance must register with the `ECS_SELINUX_CAPABLE=true` or `ECS_APPARMOR_CAPABLE=true` environment variables before containers placed on that instance can use these security options. For more information, see [Amazon ECS Container Agent Configuration](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) in the *Amazon Elastic Container Service Developer Guide*.
Valid values: "no-new-privileges" \$1 "apparmor:PROFILE" \$1 "label:value" \$1 "credentialspec:CredentialSpecFilePath"  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EntryPoint`  <a name="cfn-ecs-taskdefinition-containerdefinition-entrypoint"></a>
Early versions of the Amazon ECS container agent don't properly handle `entryPoint` parameters. If you have problems using `entryPoint`, update your container agent or enter your commands and arguments as `command` array items instead.
The entry point that's passed to the container. This parameter maps to `Entrypoint` in the docker container create command and the `--entrypoint` option to docker run.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Environment`  <a name="cfn-ecs-taskdefinition-containerdefinition-environment"></a>
The environment variables to pass to a container. This parameter maps to `Env` in the docker container create command and the `--env` option to docker run.  
We don't recommend that you use plaintext environment variables for sensitive information, such as credential data.
*Required*: No  
*Type*: Array of [KeyValuePair](aws-properties-ecs-taskdefinition-keyvaluepair.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EnvironmentFiles`  <a name="cfn-ecs-taskdefinition-containerdefinition-environmentfiles"></a>
A list of files containing the environment variables to pass to a container. This parameter maps to the `--env-file` option to docker run.  
You can specify up to ten environment files. The file must have a `.env` file extension. Each line in an environment file contains an environment variable in `VARIABLE=VALUE` format. Lines beginning with `#` are treated as comments and are ignored.  
If there are environment variables specified using the `environment` parameter in a container definition, they take precedence over the variables contained within an environment file. If multiple environment files are specified that contain the same variable, they're processed from the top down. We recommend that you use unique variable names. For more information, see [Specifying Environment Variables](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/taskdef-envfiles.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: Array of [EnvironmentFile](aws-properties-ecs-taskdefinition-environmentfile.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Essential`  <a name="cfn-ecs-taskdefinition-containerdefinition-essential"></a>
If the `essential` parameter of a container is marked as `true`, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If the `essential` parameter of a container is marked as `false`, its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.  
All tasks must have at least one essential container. If you have an application that's composed of multiple containers, group containers that are used for a common purpose into components, and separate the different components into multiple task definitions. For more information, see [Application Architecture](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/application_architecture.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ExtraHosts`  <a name="cfn-ecs-taskdefinition-containerdefinition-extrahosts"></a>
A list of hostnames and IP address mappings to append to the `/etc/hosts` file on the container. This parameter maps to `ExtraHosts` in the docker container create command and the `--add-host` option to docker run.  
This parameter isn't supported for Windows containers or tasks that use the `awsvpc` network mode.
*Required*: No  
*Type*: Array of [HostEntry](aws-properties-ecs-taskdefinition-hostentry.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FirelensConfiguration`  <a name="cfn-ecs-taskdefinition-containerdefinition-firelensconfiguration"></a>
The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see [Custom Log Routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: [FirelensConfiguration](aws-properties-ecs-taskdefinition-firelensconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`HealthCheck`  <a name="cfn-ecs-taskdefinition-containerdefinition-healthcheck"></a>
The container health check command and associated configuration parameters for the container. This parameter maps to `HealthCheck` in the docker container create command and the `HEALTHCHECK` parameter of docker run.  
*Required*: No  
*Type*: [HealthCheck](aws-properties-ecs-taskdefinition-healthcheck.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Hostname`  <a name="cfn-ecs-taskdefinition-containerdefinition-hostname"></a>
The hostname to use for your container. This parameter maps to `Hostname` in the docker container create command and the `--hostname` option to docker run.  
The `hostname` parameter is not supported if you're using the `awsvpc` network mode.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Image`  <a name="cfn-ecs-taskdefinition-containerdefinition-image"></a>
The image used to start a container. This string is passed directly to the Docker daemon. By default, images in the Docker Hub registry are available. Other repositories are specified with either `repository-url/image:tag` or `repository-url/image@digest`. For images using tags (repository-url/image:tag), up to 255 characters total are allowed, including letters (uppercase and lowercase), numbers, hyphens, underscores, colons, periods, forward slashes, and number signs (\$1). For images using digests (repository-url/image@digest), the 255 character limit applies only to the repository URL and image name (everything before the @ sign). The only supported hash function is sha256, and the hash value after sha256: must be exactly 64 characters (only letters A-F, a-f, and numbers 0-9 are allowed). This parameter maps to `Image` in the docker container create command and the `IMAGE` parameter of docker run.  
+ When a new task starts, the Amazon ECS container agent pulls the latest version of the specified image and tag for the container to use. However, subsequent updates to a repository image aren't propagated to already running tasks.
+ Images in Amazon ECR repositories can be specified by either using the full `registry/repository:tag` or `registry/repository@digest`. For example, `012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>:latest` or `012345678910.dkr.ecr.<region-name>.amazonaws.com/<repository-name>@sha256:94afd1f2e64d908bc90dbca0035a5b567EXAMPLE`. 
+ Images in official repositories on Docker Hub use a single name (for example, `ubuntu` or `mongo`).
+ Images in other repositories on Docker Hub are qualified with an organization name (for example, `amazon/amazon-ecs-agent`).
+ Images in other online repositories are qualified further by a domain name (for example, `quay.io/assemblyline/ubuntu`).
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Interactive`  <a name="cfn-ecs-taskdefinition-containerdefinition-interactive"></a>
When this parameter is `true`, you can deploy containerized applications that require `stdin` or a `tty` to be allocated. This parameter maps to `OpenStdin` in the docker container create command and the `--interactive` option to docker run.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Links`  <a name="cfn-ecs-taskdefinition-containerdefinition-links"></a>
The `links` parameter allows containers to communicate with each other without the need for port mappings. This parameter is only supported if the network mode of a task definition is `bridge`. The `name:internalName` construct is analogous to `name:alias` in Docker links. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.. This parameter maps to `Links` in the docker container create command and the `--link` option to docker run.  
This parameter is not supported for Windows containers.
Containers that are collocated on a single container instance may be able to communicate with each other without requiring links or host port mappings. Network isolation is achieved on the container instance using security groups and VPC settings.
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LinuxParameters`  <a name="cfn-ecs-taskdefinition-containerdefinition-linuxparameters"></a>
Linux-specific modifications that are applied to the container, such as Linux kernel capabilities. For more information see [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html).  
This parameter is not supported for Windows containers.
*Required*: No  
*Type*: [LinuxParameters](aws-properties-ecs-taskdefinition-linuxparameters.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LogConfiguration`  <a name="cfn-ecs-taskdefinition-containerdefinition-logconfiguration"></a>
The log configuration specification for the container.  
This parameter maps to `LogConfig` in the docker Create a container command and the `--log-driver` option to docker run. By default, containers use the same logging driver that the Docker daemon uses. However, the container may use a different logging driver than the Docker daemon by specifying a log driver with this parameter in the container definition. To use a different logging driver for a container, the log system must be configured properly on the container instance (or on a different log server for remote logging options). For more information on the options for different supported log drivers, see [Configure logging drivers](https://docs.docker.com/engine/admin/logging/overview/) in the Docker documentation.  
Amazon ECS currently supports a subset of the logging drivers available to the Docker daemon (shown in the [LogConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_LogConfiguration.html) data type). Additional log drivers may be available in future releases of the Amazon ECS container agent.
This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`  
The Amazon ECS container agent running on a container instance must register the logging drivers available on that instance with the `ECS_AVAILABLE_LOGGING_DRIVERS` environment variable before containers placed on that instance can use these log configuration options. For more information, see [Amazon ECS Container Agent Configuration](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html) in the *Amazon Elastic Container Service Developer Guide*.
*Required*: No  
*Type*: [LogConfiguration](aws-properties-ecs-taskdefinition-logconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Memory`  <a name="cfn-ecs-taskdefinition-containerdefinition-memory"></a>
The amount (in MiB) of memory to present to the container. If your container attempts to exceed the memory specified here, the container is killed. The total amount of memory reserved for all containers within a task must be lower than the task `memory` value, if one is specified. This parameter maps to `Memory` in the [Create a container](https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.docker.com/engine/api/v1.35/) and the `--memory` option to [docker run](https://docs.docker.com/engine/reference/run/#security-configuration).  
If using the Fargate launch type, this parameter is optional.  
If using the EC2 launch type, you must specify either a task-level memory value or a container-level memory value. If you specify both a container-level `memory` and `memoryReservation` value, `memory` must be greater than `memoryReservation`. If you specify `memoryReservation`, then that value is subtracted from the available memory resources for the container instance where the container is placed. Otherwise, the value of `memory` is used.  
The Docker 20.10.0 or later daemon reserves a minimum of 6 MiB of memory for a container, so you should not specify fewer than 6 MiB of memory for your containers.  
The Docker 19.03.13-ce or earlier daemon reserves a minimum of 4 MiB of memory for a container, so you should not specify fewer than 4 MiB of memory for your containers.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MemoryReservation`  <a name="cfn-ecs-taskdefinition-containerdefinition-memoryreservation"></a>
The soft limit (in MiB) of memory to reserve for the container. When system memory is under heavy contention, Docker attempts to keep the container memory to this soft limit. However, your container can consume more memory when it needs to, up to either the hard limit specified with the `memory` parameter (if applicable), or all of the available memory on the container instance, whichever comes first. This parameter maps to `MemoryReservation` in the docker container create command and the `--memory-reservation` option to docker run.  
If a task-level memory value is not specified, you must specify a non-zero integer for one or both of `memory` or `memoryReservation` in a container definition. If you specify both, `memory` must be greater than `memoryReservation`. If you specify `memoryReservation`, then that value is subtracted from the available memory resources for the container instance where the container is placed. Otherwise, the value of `memory` is used.  
For example, if your container normally uses 128 MiB of memory, but occasionally bursts to 256 MiB of memory for short periods of time, you can set a `memoryReservation` of 128 MiB, and a `memory` hard limit of 300 MiB. This configuration would allow the container to only reserve 128 MiB of memory from the remaining resources on the container instance, but also allow the container to consume more memory resources when needed.  
The Docker 20.10.0 or later daemon reserves a minimum of 6 MiB of memory for a container. So, don't specify less than 6 MiB of memory for your containers.   
The Docker 19.03.13-ce or earlier daemon reserves a minimum of 4 MiB of memory for a container. So, don't specify less than 4 MiB of memory for your containers.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MountPoints`  <a name="cfn-ecs-taskdefinition-containerdefinition-mountpoints"></a>
The mount points for data volumes in your container.  
This parameter maps to `Volumes` in the docker container create command and the `--volume` option to docker run.  
Windows containers can mount whole directories on the same drive as `$env:ProgramData`. Windows containers can't mount directories on a different drive, and mount point can't be across drives.  
*Required*: No  
*Type*: Array of [MountPoint](aws-properties-ecs-taskdefinition-mountpoint.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-ecs-taskdefinition-containerdefinition-name"></a>
The name of a container. If you're linking multiple containers together in a task definition, the `name` of one container can be entered in the `links` of another container to connect the containers. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed. This parameter maps to `name` in the docker container create command and the `--name` option to docker run.   
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PortMappings`  <a name="cfn-ecs-taskdefinition-containerdefinition-portmappings"></a>
The list of port mappings for the container. Port mappings allow containers to access ports on the host container instance to send or receive traffic.  
For task definitions that use the `awsvpc` network mode, you should only specify the `containerPort`. The `hostPort` can be left blank or it must be the same value as the `containerPort`.  
Port mappings on Windows use the `NetNAT` gateway address rather than `localhost`. There is no loopback for port mappings on Windows, so you cannot access a container's mapped port from the host itself.   
This parameter maps to `PortBindings` in the [Create a container](https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.docker.com/engine/api/v1.35/) and the `--publish` option to [docker run](https://docs.docker.com/engine/reference/run/). If the network mode of a task definition is set to `none`, then you can't specify port mappings. If the network mode of a task definition is set to `host`, then host ports must either be undefined or they must match the container port in the port mapping.  
After a task reaches the `RUNNING` status, manual and automatic host and container port assignments are visible in the **Network Bindings** section of a container description for a selected task in the Amazon ECS console. The assignments are also visible in the `networkBindings` section [DescribeTasks](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html) responses.
*Required*: No  
*Type*: Array of [PortMapping](aws-properties-ecs-taskdefinition-portmapping.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Privileged`  <a name="cfn-ecs-taskdefinition-containerdefinition-privileged"></a>
When this parameter is true, the container is given elevated privileges on the host container instance (similar to the `root` user). This parameter maps to `Privileged` in the docker container create command and the `--privileged` option to docker run  
This parameter is not supported for Windows containers or tasks run on AWS Fargate.
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PseudoTerminal`  <a name="cfn-ecs-taskdefinition-containerdefinition-pseudoterminal"></a>
When this parameter is `true`, a TTY is allocated. This parameter maps to `Tty` in the docker container create command and the `--tty` option to docker run.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ReadonlyRootFilesystem`  <a name="cfn-ecs-taskdefinition-containerdefinition-readonlyrootfilesystem"></a>
When this parameter is true, the container is given read-only access to its root file system. This parameter maps to `ReadonlyRootfs` in the docker container create command and the `--read-only` option to docker run.  
This parameter is not supported for Windows containers.
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RepositoryCredentials`  <a name="cfn-ecs-taskdefinition-containerdefinition-repositorycredentials"></a>
The private repository authentication credentials to use.  
*Required*: No  
*Type*: [RepositoryCredentials](aws-properties-ecs-taskdefinition-repositorycredentials.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ResourceRequirements`  <a name="cfn-ecs-taskdefinition-containerdefinition-resourcerequirements"></a>
The type and amount of a resource to assign to a container. The only supported resource is a GPU.  
*Required*: No  
*Type*: Array of [ResourceRequirement](aws-properties-ecs-taskdefinition-resourcerequirement.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestartPolicy`  <a name="cfn-ecs-taskdefinition-containerdefinition-restartpolicy"></a>
The restart policy for a container. When you set up a restart policy, Amazon ECS can restart the container without needing to replace the task. For more information, see [Restart individual containers in Amazon ECS tasks with container restart policies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-restart-policy.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: [RestartPolicy](aws-properties-ecs-taskdefinition-restartpolicy.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Secrets`  <a name="cfn-ecs-taskdefinition-containerdefinition-secrets"></a>
The secrets to pass to the container. For more information, see [Specifying Sensitive Data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: Array of [Secret](aws-properties-ecs-taskdefinition-secret.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StartTimeout`  <a name="cfn-ecs-taskdefinition-containerdefinition-starttimeout"></a>
Time duration (in seconds) to wait before giving up on resolving dependencies for a container. For example, you specify two containers in a task definition with containerA having a dependency on containerB reaching a `COMPLETE`, `SUCCESS`, or `HEALTHY` status. If a `startTimeout` value is specified for containerB and it doesn't reach the desired status within that time then containerA gives up and not start. This results in the task transitioning to a `STOPPED` state.  
When the `ECS_CONTAINER_START_TIMEOUT` container agent configuration variable is used, it's enforced independently from this start timeout value.
For tasks using the Fargate launch type, the task or service requires the following platforms:  
+ Linux platform version `1.3.0` or later.
+ Windows platform version `1.0.0` or later.
For tasks using the EC2 launch type, your container instances require at least version `1.26.0` of the container agent to use a container start timeout value. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) in the *Amazon Elastic Container Service Developer Guide*. If you're using an Amazon ECS-optimized Linux AMI, your instance needs at least version `1.26.0-1` of the `ecs-init` package. If your container instances are launched from version `20190301` or later, then they contain the required versions of the container agent and `ecs-init`. For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide*.  
The valid values for Fargate are 2-120 seconds.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StopTimeout`  <a name="cfn-ecs-taskdefinition-containerdefinition-stoptimeout"></a>
Time duration (in seconds) to wait before the container is forcefully killed if it doesn't exit normally on its own.  
For tasks using the Fargate launch type, the task or service requires the following platforms:  
+ Linux platform version `1.3.0` or later.
+ Windows platform version `1.0.0` or later.
For tasks that use the Fargate launch type, the max stop timeout value is 120 seconds and if the parameter is not specified, the default value of 30 seconds is used.  
For tasks that use the EC2 launch type, if the `stopTimeout` parameter isn't specified, the value set for the Amazon ECS container agent configuration variable `ECS_CONTAINER_STOP_TIMEOUT` is used. If neither the `stopTimeout` parameter or the `ECS_CONTAINER_STOP_TIMEOUT` agent configuration variable are set, then the default values of 30 seconds for Linux containers and 30 seconds on Windows containers are used. Your container instances require at least version 1.26.0 of the container agent to use a container stop timeout value. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) in the *Amazon Elastic Container Service Developer Guide*. If you're using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the `ecs-init` package. If your container instances are launched from version `20190301` or later, then they contain the required versions of the container agent and `ecs-init`. For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide*.  
The valid values for Fargate are 2-120 seconds.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SystemControls`  <a name="cfn-ecs-taskdefinition-containerdefinition-systemcontrols"></a>
A list of namespaced kernel parameters to set in the container. This parameter maps to `Sysctls` in the docker container create command and the `--sysctl` option to docker run. For example, you can configure `net.ipv4.tcp_keepalive_time` setting to maintain longer lived connections.  
*Required*: No  
*Type*: Array of [SystemControl](aws-properties-ecs-taskdefinition-systemcontrol.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Ulimits`  <a name="cfn-ecs-taskdefinition-containerdefinition-ulimits"></a>
A list of `ulimits` to set in the container. This parameter maps to `Ulimits` in the [Create a container](https://docs.docker.com/engine/api/v1.35/#operation/ContainerCreate) section of the [Docker Remote API](https://docs.docker.com/engine/api/v1.35/) and the `--ulimit` option to [docker run](https://docs.docker.com/engine/reference/run/). Valid naming values are displayed in the [Ulimit](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_Ulimit.html) data type. This parameter requires version 1.18 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`  
This parameter is not supported for Windows containers.
*Required*: No  
*Type*: Array of [Ulimit](aws-properties-ecs-taskdefinition-ulimit.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`User`  <a name="cfn-ecs-taskdefinition-containerdefinition-user"></a>
The user to use inside the container. This parameter maps to `User` in the docker container create command and the `--user` option to docker run.  
When running tasks using the `host` network mode, don't run containers using the root user (UID 0). We recommend using a non-root user for better security.
You can specify the `user` using the following formats. If specifying a UID or GID, you must specify it as a positive integer.  
+  `user` 
+  `user:group` 
+  `uid` 
+  `uid:gid` 
+  `user:gid` 
+  `uid:group` 
This parameter is not supported for Windows containers.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`VersionConsistency`  <a name="cfn-ecs-taskdefinition-containerdefinition-versionconsistency"></a>
Specifies whether Amazon ECS will resolve the container image tag provided in the container definition to an image digest. By default, the value is `enabled`. If you set the value for a container as `disabled`, Amazon ECS will not resolve the provided container image tag to a digest and will use the original image URI specified in the container definition for deployment. For more information about container image resolution, see [Container image resolution](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-ecs.html#deployment-container-image-stability) in the *Amazon ECS Developer Guide*.  
*Required*: No  
*Type*: String  
*Allowed values*: `enabled | disabled`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`VolumesFrom`  <a name="cfn-ecs-taskdefinition-containerdefinition-volumesfrom"></a>
Data volumes to mount from another container. This parameter maps to `VolumesFrom` in the docker container create command and the `--volumes-from` option to docker run.  
*Required*: No  
*Type*: Array of [VolumeFrom](aws-properties-ecs-taskdefinition-volumefrom.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`WorkingDirectory`  <a name="cfn-ecs-taskdefinition-containerdefinition-workingdirectory"></a>
The working directory to run commands inside the container in. This parameter maps to `WorkingDir` in the docker container create command and the `--workdir` option to docker run.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition ContainerDependency
<a name="aws-properties-ecs-taskdefinition-containerdependency"></a>

The `ContainerDependency` property specifies the dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed.

Your Amazon ECS container instances require at least version 1.26.0 of the container agent to enable container dependencies. However, we recommend using the latest container agent version. For information about checking your agent version and updating to the latest version, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html) in the *Amazon Elastic Container Service Developer Guide*. If you are using an Amazon ECS-optimized Linux AMI, your instance needs at least version 1.26.0-1 of the `ecs-init` package. If your container instances are launched from version `20190301` or later, then they contain the required versions of the container agent and `ecs-init`. For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html) in the *Amazon Elastic Container Service Developer Guide*.

**Note**  
For tasks using the Fargate launch type, this parameter requires that the task or service uses platform version 1.3.0 or later.

## Syntax
<a name="aws-properties-ecs-taskdefinition-containerdependency-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-containerdependency-syntax.json"></a>

```
{
  "[Condition](#cfn-ecs-taskdefinition-containerdependency-condition)" : String,
  "[ContainerName](#cfn-ecs-taskdefinition-containerdependency-containername)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-containerdependency-syntax.yaml"></a>

```
  [Condition](#cfn-ecs-taskdefinition-containerdependency-condition): String
  [ContainerName](#cfn-ecs-taskdefinition-containerdependency-containername): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-containerdependency-properties"></a>

`Condition`  <a name="cfn-ecs-taskdefinition-containerdependency-condition"></a>
The dependency condition of the container. The following are the available conditions and their behavior:  
+ `START` - This condition emulates the behavior of links and volumes today. It validates that a dependent container is started before permitting other containers to start.
+ `COMPLETE` - This condition validates that a dependent container runs to completion (exits) before permitting other containers to start. This can be useful for nonessential containers that run a script and then exit. This condition can't be set on an essential container.
+ `SUCCESS` - This condition is the same as `COMPLETE`, but it also requires that the container exits with a `zero` status. This condition can't be set on an essential container.
+ `HEALTHY` - This condition validates that the dependent container passes its Docker health check before permitting other containers to start. This requires that the dependent container has health checks configured. This condition is confirmed only at task startup.
*Required*: No  
*Type*: String  
*Allowed values*: `START | COMPLETE | SUCCESS | HEALTHY`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ContainerName`  <a name="cfn-ecs-taskdefinition-containerdependency-containername"></a>
The name of a container.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition Device
<a name="aws-properties-ecs-taskdefinition-device"></a>

The `Device` property specifies an object representing a container instance host device.

## Syntax
<a name="aws-properties-ecs-taskdefinition-device-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-device-syntax.json"></a>

```
{
  "[ContainerPath](#cfn-ecs-taskdefinition-device-containerpath)" : String,
  "[HostPath](#cfn-ecs-taskdefinition-device-hostpath)" : String,
  "[Permissions](#cfn-ecs-taskdefinition-device-permissions)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-device-syntax.yaml"></a>

```
  [ContainerPath](#cfn-ecs-taskdefinition-device-containerpath): String
  [HostPath](#cfn-ecs-taskdefinition-device-hostpath): String
  [Permissions](#cfn-ecs-taskdefinition-device-permissions): 
    - String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-device-properties"></a>

`ContainerPath`  <a name="cfn-ecs-taskdefinition-device-containerpath"></a>
The path inside the container at which to expose the host device.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`HostPath`  <a name="cfn-ecs-taskdefinition-device-hostpath"></a>
The path for the device on the host container instance.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Permissions`  <a name="cfn-ecs-taskdefinition-device-permissions"></a>
The explicit permissions to provide to the container for the device. By default, the container has permissions for `read`, `write`, and `mknod` for the device.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition DockerVolumeConfiguration
<a name="aws-properties-ecs-taskdefinition-dockervolumeconfiguration"></a>

The `DockerVolumeConfiguration` property specifies a Docker volume configuration and is used when you use Docker volumes. Docker volumes are only supported when you are using the EC2 launch type. Windows containers only support the use of the `local` driver. To use bind mounts, specify a `host` instead.

## Syntax
<a name="aws-properties-ecs-taskdefinition-dockervolumeconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-dockervolumeconfiguration-syntax.json"></a>

```
{
  "[Autoprovision](#cfn-ecs-taskdefinition-dockervolumeconfiguration-autoprovision)" : Boolean,
  "[Driver](#cfn-ecs-taskdefinition-dockervolumeconfiguration-driver)" : String,
  "[DriverOpts](#cfn-ecs-taskdefinition-dockervolumeconfiguration-driveropts)" : {Key: Value, ...},
  "[Labels](#cfn-ecs-taskdefinition-dockervolumeconfiguration-labels)" : {Key: Value, ...},
  "[Scope](#cfn-ecs-taskdefinition-dockervolumeconfiguration-scope)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-dockervolumeconfiguration-syntax.yaml"></a>

```
  [Autoprovision](#cfn-ecs-taskdefinition-dockervolumeconfiguration-autoprovision): Boolean
  [Driver](#cfn-ecs-taskdefinition-dockervolumeconfiguration-driver): String
  [DriverOpts](#cfn-ecs-taskdefinition-dockervolumeconfiguration-driveropts): 
    Key: Value
  [Labels](#cfn-ecs-taskdefinition-dockervolumeconfiguration-labels): 
    Key: Value
  [Scope](#cfn-ecs-taskdefinition-dockervolumeconfiguration-scope): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-dockervolumeconfiguration-properties"></a>

`Autoprovision`  <a name="cfn-ecs-taskdefinition-dockervolumeconfiguration-autoprovision"></a>
If this value is `true`, the Docker volume is created if it doesn't already exist.  
This field is only used if the `scope` is `shared`.
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Driver`  <a name="cfn-ecs-taskdefinition-dockervolumeconfiguration-driver"></a>
The Docker volume driver to use. The driver value must match the driver name provided by Docker because it is used for task placement. If the driver was installed using the Docker plugin CLI, use `docker plugin ls` to retrieve the driver name from your container instance. If the driver was installed using another method, use Docker plugin discovery to retrieve the driver name. This parameter maps to `Driver` in the docker container create command and the `xxdriver` option to docker volume create.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DriverOpts`  <a name="cfn-ecs-taskdefinition-dockervolumeconfiguration-driveropts"></a>
A map of Docker driver-specific options passed through. This parameter maps to `DriverOpts` in the docker create-volume command and the `xxopt` option to docker volume create.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `.{1,}`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Labels`  <a name="cfn-ecs-taskdefinition-dockervolumeconfiguration-labels"></a>
Custom metadata to add to your Docker volume. This parameter maps to `Labels` in the docker container create command and the `xxlabel` option to docker volume create.  
*Required*: No  
*Type*: Object of String  
*Pattern*: `.{1,}`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Scope`  <a name="cfn-ecs-taskdefinition-dockervolumeconfiguration-scope"></a>
The scope for the Docker volume that determines its lifecycle. Docker volumes that are scoped to a `task` are automatically provisioned when the task starts and destroyed when the task stops. Docker volumes that are scoped as `shared` persist after the task stops.  
*Required*: No  
*Type*: String  
*Allowed values*: `task | shared`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition EFSVolumeConfiguration
<a name="aws-properties-ecs-taskdefinition-efsvolumeconfiguration"></a>

This parameter is specified when you're using an Amazon Elastic File System file system for task storage. For more information, see [Amazon EFS volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-taskdefinition-efsvolumeconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-efsvolumeconfiguration-syntax.json"></a>

```
{
  "[AuthorizationConfig](#cfn-ecs-taskdefinition-efsvolumeconfiguration-authorizationconfig)" : AuthorizationConfig,
  "[FilesystemId](#cfn-ecs-taskdefinition-efsvolumeconfiguration-filesystemid)" : String,
  "[RootDirectory](#cfn-ecs-taskdefinition-efsvolumeconfiguration-rootdirectory)" : String,
  "[TransitEncryption](#cfn-ecs-taskdefinition-efsvolumeconfiguration-transitencryption)" : String,
  "[TransitEncryptionPort](#cfn-ecs-taskdefinition-efsvolumeconfiguration-transitencryptionport)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-efsvolumeconfiguration-syntax.yaml"></a>

```
  [AuthorizationConfig](#cfn-ecs-taskdefinition-efsvolumeconfiguration-authorizationconfig): 
    AuthorizationConfig
  [FilesystemId](#cfn-ecs-taskdefinition-efsvolumeconfiguration-filesystemid): String
  [RootDirectory](#cfn-ecs-taskdefinition-efsvolumeconfiguration-rootdirectory): String
  [TransitEncryption](#cfn-ecs-taskdefinition-efsvolumeconfiguration-transitencryption): String
  [TransitEncryptionPort](#cfn-ecs-taskdefinition-efsvolumeconfiguration-transitencryptionport): Integer
```

## Properties
<a name="aws-properties-ecs-taskdefinition-efsvolumeconfiguration-properties"></a>

`AuthorizationConfig`  <a name="cfn-ecs-taskdefinition-efsvolumeconfiguration-authorizationconfig"></a>
The authorization configuration details for the Amazon EFS file system.  
*Required*: No  
*Type*: [AuthorizationConfig](aws-properties-ecs-taskdefinition-authorizationconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FilesystemId`  <a name="cfn-ecs-taskdefinition-efsvolumeconfiguration-filesystemid"></a>
The Amazon EFS file system ID to use.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RootDirectory`  <a name="cfn-ecs-taskdefinition-efsvolumeconfiguration-rootdirectory"></a>
The directory within the Amazon EFS file system to mount as the root directory inside the host. If this parameter is omitted, the root of the Amazon EFS volume will be used. Specifying `/` will have the same effect as omitting this parameter.  
If an EFS access point is specified in the `authorizationConfig`, the root directory parameter must either be omitted or set to `/` which will enforce the path set on the EFS access point.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TransitEncryption`  <a name="cfn-ecs-taskdefinition-efsvolumeconfiguration-transitencryption"></a>
Determines whether to use encryption for Amazon EFS data in transit between the Amazon ECS host and the Amazon EFS server. Transit encryption must be turned on if Amazon EFS IAM authorization is used. If this parameter is omitted, the default value of `DISABLED` is used. For more information, see [Encrypting data in transit](https://docs.aws.amazon.com/efs/latest/ug/encryption-in-transit.html) in the *Amazon Elastic File System User Guide*.  
*Required*: No  
*Type*: String  
*Allowed values*: `ENABLED | DISABLED`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TransitEncryptionPort`  <a name="cfn-ecs-taskdefinition-efsvolumeconfiguration-transitencryptionport"></a>
The port to use when sending encrypted data between the Amazon ECS host and the Amazon EFS server. If you do not specify a transit encryption port, it will use the port selection strategy that the Amazon EFS mount helper uses. For more information, see [EFS mount helper](https://docs.aws.amazon.com/efs/latest/ug/efs-mount-helper.html) in the *Amazon Elastic File System User Guide*.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition EnvironmentFile
<a name="aws-properties-ecs-taskdefinition-environmentfile"></a>

A list of files containing the environment variables to pass to a container. You can specify up to ten environment files. The file must have a `.env` file extension. Each line in an environment file should contain an environment variable in `VARIABLE=VALUE` format. Lines beginning with `#` are treated as comments and are ignored.

If there are environment variables specified using the `environment` parameter in a container definition, they take precedence over the variables contained within an environment file. If multiple environment files are specified that contain the same variable, they're processed from the top down. We recommend that you use unique variable names. For more information, see [Use a file to pass environment variables to a container](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/use-environment-file.html) in the *Amazon Elastic Container Service Developer Guide*.

Environment variable files are objects in Amazon S3 and all Amazon S3 security considerations apply. 

You must use the following platforms for the Fargate launch type:
+ Linux platform version `1.4.0` or later.
+ Windows platform version `1.0.0` or later.

Consider the following when using the Fargate launch type:
+ The file is handled like a native Docker env-file.
+ There is no support for shell escape handling.
+ The container entry point interperts the `VARIABLE` values.

## Syntax
<a name="aws-properties-ecs-taskdefinition-environmentfile-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-environmentfile-syntax.json"></a>

```
{
  "[Type](#cfn-ecs-taskdefinition-environmentfile-type)" : String,
  "[Value](#cfn-ecs-taskdefinition-environmentfile-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-environmentfile-syntax.yaml"></a>

```
  [Type](#cfn-ecs-taskdefinition-environmentfile-type): String
  [Value](#cfn-ecs-taskdefinition-environmentfile-value): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-environmentfile-properties"></a>

`Type`  <a name="cfn-ecs-taskdefinition-environmentfile-type"></a>
The file type to use. Environment files are objects in Amazon S3. The only supported value is `s3`.  
*Required*: No  
*Type*: String  
*Allowed values*: `s3`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-ecs-taskdefinition-environmentfile-value"></a>
The Amazon Resource Name (ARN) of the Amazon S3 object containing the environment variable file.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition EphemeralStorage
<a name="aws-properties-ecs-taskdefinition-ephemeralstorage"></a>

The amount of ephemeral storage to allocate for the task. This parameter is used to expand the total amount of ephemeral storage available, beyond the default amount, for tasks hosted on AWS Fargate. For more information, see [Using data volumes in tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html) in the *Amazon ECS Developer Guide;*.

**Note**  
For tasks using the Fargate launch type, the task requires the following platforms:  
Linux platform version `1.4.0` or later.
Windows platform version `1.0.0` or later.

## Syntax
<a name="aws-properties-ecs-taskdefinition-ephemeralstorage-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-ephemeralstorage-syntax.json"></a>

```
{
  "[SizeInGiB](#cfn-ecs-taskdefinition-ephemeralstorage-sizeingib)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-ephemeralstorage-syntax.yaml"></a>

```
  [SizeInGiB](#cfn-ecs-taskdefinition-ephemeralstorage-sizeingib): Integer
```

## Properties
<a name="aws-properties-ecs-taskdefinition-ephemeralstorage-properties"></a>

`SizeInGiB`  <a name="cfn-ecs-taskdefinition-ephemeralstorage-sizeingib"></a>
The total amount, in GiB, of ephemeral storage to set for the task. The minimum supported value is `21` GiB and the maximum supported value is `200` GiB.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition FirelensConfiguration
<a name="aws-properties-ecs-taskdefinition-firelensconfiguration"></a>

The FireLens configuration for the container. This is used to specify and configure a log router for container logs. For more information, see [Custom log routing](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-taskdefinition-firelensconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-firelensconfiguration-syntax.json"></a>

```
{
  "[Options](#cfn-ecs-taskdefinition-firelensconfiguration-options)" : {Key: Value, ...},
  "[Type](#cfn-ecs-taskdefinition-firelensconfiguration-type)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-firelensconfiguration-syntax.yaml"></a>

```
  [Options](#cfn-ecs-taskdefinition-firelensconfiguration-options): 
    Key: Value
  [Type](#cfn-ecs-taskdefinition-firelensconfiguration-type): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-firelensconfiguration-properties"></a>

`Options`  <a name="cfn-ecs-taskdefinition-firelensconfiguration-options"></a>
The options to use when configuring the log router. This field is optional and can be used to add additional metadata, such as the task, task definition, cluster, and container instance details to the log event.  
 If specified, valid option keys are:  
+ `enable-ecs-log-metadata`, which can be `true` or `false`
+ `config-file-type`, which can be `s3` or `file`
+ `config-file-value`, which is either an S3 ARN or a file path
*Required*: No  
*Type*: Object of String  
*Pattern*: `.{1,}`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Type`  <a name="cfn-ecs-taskdefinition-firelensconfiguration-type"></a>
The log router to use. The valid values are `fluentd` or `fluentbit`.  
*Required*: No  
*Type*: String  
*Allowed values*: `fluentd | fluentbit`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition FSxAuthorizationConfig
<a name="aws-properties-ecs-taskdefinition-fsxauthorizationconfig"></a>

The authorization configuration details for Amazon FSx for Windows File Server file system. See [FSxWindowsFileServerVolumeConfiguration](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_FSxWindowsFileServerVolumeConfiguration.html) in the *Amazon ECS API Reference*.

For more information and the input format, see [Amazon FSx for Windows File Server Volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/wfsx-volumes.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-taskdefinition-fsxauthorizationconfig-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-fsxauthorizationconfig-syntax.json"></a>

```
{
  "[CredentialsParameter](#cfn-ecs-taskdefinition-fsxauthorizationconfig-credentialsparameter)" : String,
  "[Domain](#cfn-ecs-taskdefinition-fsxauthorizationconfig-domain)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-fsxauthorizationconfig-syntax.yaml"></a>

```
  [CredentialsParameter](#cfn-ecs-taskdefinition-fsxauthorizationconfig-credentialsparameter): String
  [Domain](#cfn-ecs-taskdefinition-fsxauthorizationconfig-domain): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-fsxauthorizationconfig-properties"></a>

`CredentialsParameter`  <a name="cfn-ecs-taskdefinition-fsxauthorizationconfig-credentialsparameter"></a>
The authorization credential option to use. The authorization credential options can be provided using either the Amazon Resource Name (ARN) of an AWS Secrets Manager secret or SSM Parameter Store parameter. The ARN refers to the stored credentials.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Domain`  <a name="cfn-ecs-taskdefinition-fsxauthorizationconfig-domain"></a>
A fully qualified domain name hosted by an [AWS Directory Service](https://docs.aws.amazon.com/directoryservice/latest/admin-guide/directory_microsoft_ad.html) Managed Microsoft AD (Active Directory) or self-hosted AD on Amazon EC2.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition FSxWindowsFileServerVolumeConfiguration
<a name="aws-properties-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration"></a>

This parameter is specified when you're using [Amazon FSx for Windows File Server](https://docs.aws.amazon.com/fsx/latest/WindowsGuide/what-is.html) file system for task storage.

For more information and the input format, see [Amazon FSx for Windows File Server volumes](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/wfsx-volumes.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-syntax.json"></a>

```
{
  "[AuthorizationConfig](#cfn-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-authorizationconfig)" : FSxAuthorizationConfig,
  "[FileSystemId](#cfn-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-filesystemid)" : String,
  "[RootDirectory](#cfn-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-rootdirectory)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-syntax.yaml"></a>

```
  [AuthorizationConfig](#cfn-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-authorizationconfig): 
    FSxAuthorizationConfig
  [FileSystemId](#cfn-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-filesystemid): String
  [RootDirectory](#cfn-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-rootdirectory): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-properties"></a>

`AuthorizationConfig`  <a name="cfn-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-authorizationconfig"></a>
The authorization configuration details for the Amazon FSx for Windows File Server file system.  
*Required*: No  
*Type*: [FSxAuthorizationConfig](aws-properties-ecs-taskdefinition-fsxauthorizationconfig.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FileSystemId`  <a name="cfn-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-filesystemid"></a>
The Amazon FSx for Windows File Server file system ID to use.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RootDirectory`  <a name="cfn-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration-rootdirectory"></a>
The directory within the Amazon FSx for Windows File Server file system to mount as the root directory inside the host.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition HealthCheck
<a name="aws-properties-ecs-taskdefinition-healthcheck"></a>

The `HealthCheck` property specifies an object representing a container health check. Health check parameters that are specified in a container definition override any Docker health checks that exist in the container image (such as those specified in a parent image or from the image's Dockerfile). This configuration maps to the `HEALTHCHECK` parameter of docker run.

**Note**  
The Amazon ECS container agent only monitors and reports on the health checks specified in the task definition. Amazon ECS does not monitor Docker health checks that are embedded in a container image and not specified in the container definition. Health check parameters that are specified in a container definition override any Docker health checks that exist in the container image.

If a task is run manually, and not as part of a service, the task will continue its lifecycle regardless of its health status. For tasks that are part of a service, if the task reports as unhealthy then the task will be stopped and the service scheduler will replace it.

The following are notes about container health check support:
+ Container health checks require version 1.17.0 or greater of the Amazon ECS container agent. For more information, see [Updating the Amazon ECS Container Agent](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-update.html).
+ Container health checks are supported for Fargate tasks if you are using platform version 1.1.0 or greater. For more information, see [AWS Fargate Platform Versions](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/platform_versions.html).
+ Container health checks are not supported for tasks that are part of a service that is configured to use a Classic Load Balancer.

## Syntax
<a name="aws-properties-ecs-taskdefinition-healthcheck-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-healthcheck-syntax.json"></a>

```
{
  "[Command](#cfn-ecs-taskdefinition-healthcheck-command)" : [ String, ... ],
  "[Interval](#cfn-ecs-taskdefinition-healthcheck-interval)" : Integer,
  "[Retries](#cfn-ecs-taskdefinition-healthcheck-retries)" : Integer,
  "[StartPeriod](#cfn-ecs-taskdefinition-healthcheck-startperiod)" : Integer,
  "[Timeout](#cfn-ecs-taskdefinition-healthcheck-timeout)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-healthcheck-syntax.yaml"></a>

```
  [Command](#cfn-ecs-taskdefinition-healthcheck-command): 
    - String
  [Interval](#cfn-ecs-taskdefinition-healthcheck-interval): Integer
  [Retries](#cfn-ecs-taskdefinition-healthcheck-retries): Integer
  [StartPeriod](#cfn-ecs-taskdefinition-healthcheck-startperiod): Integer
  [Timeout](#cfn-ecs-taskdefinition-healthcheck-timeout): Integer
```

## Properties
<a name="aws-properties-ecs-taskdefinition-healthcheck-properties"></a>

`Command`  <a name="cfn-ecs-taskdefinition-healthcheck-command"></a>
A string array representing the command that the container runs to determine if it is healthy. The string array must start with `CMD` to run the command arguments directly, or `CMD-SHELL` to run the command with the container's default shell.   
 When you use the AWS Management Console JSON panel, the AWS Command Line Interface, or the APIs, enclose the list of commands in double quotes and brackets.  
 `[ "CMD-SHELL", "curl -f http://localhost/ || exit 1" ]`   
You don't include the double quotes and brackets when you use the AWS Management Console.  
 ` CMD-SHELL, curl -f http://localhost/ || exit 1`   
An exit code of 0 indicates success, and non-zero exit code indicates failure. For more information, see `HealthCheck` in the docker container create command.  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Interval`  <a name="cfn-ecs-taskdefinition-healthcheck-interval"></a>
The time period in seconds between each health check execution. You may specify between 5 and 300 seconds. The default value is 30 seconds. This value applies only when you specify a `command`.   
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Retries`  <a name="cfn-ecs-taskdefinition-healthcheck-retries"></a>
The number of times to retry a failed health check before the container is considered unhealthy. You may specify between 1 and 10 retries. The default value is 3. This value applies only when you specify a `command`.   
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`StartPeriod`  <a name="cfn-ecs-taskdefinition-healthcheck-startperiod"></a>
The optional grace period to provide containers time to bootstrap before failed health checks count towards the maximum number of retries. You can specify between 0 and 300 seconds. By default, the `startPeriod` is off. This value applies only when you specify a `command`.   
If a health check succeeds within the `startPeriod`, then the container is considered healthy and any subsequent failures count toward the maximum number of retries.
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Timeout`  <a name="cfn-ecs-taskdefinition-healthcheck-timeout"></a>
The time period in seconds to wait for a health check to succeed before it is considered a failure. You may specify between 2 and 60 seconds. The default value is 5. This value applies only when you specify a `command`.   
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition HostEntry
<a name="aws-properties-ecs-taskdefinition-hostentry"></a>

The `HostEntry` property specifies a hostname and an IP address that are added to the `/etc/hosts` file of a container through the `extraHosts` parameter of its `ContainerDefinition` resource.

## Syntax
<a name="aws-properties-ecs-taskdefinition-hostentry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-hostentry-syntax.json"></a>

```
{
  "[Hostname](#cfn-ecs-taskdefinition-hostentry-hostname)" : String,
  "[IpAddress](#cfn-ecs-taskdefinition-hostentry-ipaddress)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-hostentry-syntax.yaml"></a>

```
  [Hostname](#cfn-ecs-taskdefinition-hostentry-hostname): String
  [IpAddress](#cfn-ecs-taskdefinition-hostentry-ipaddress): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-hostentry-properties"></a>

`Hostname`  <a name="cfn-ecs-taskdefinition-hostentry-hostname"></a>
The hostname to use in the `/etc/hosts` entry.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`IpAddress`  <a name="cfn-ecs-taskdefinition-hostentry-ipaddress"></a>
The IP address to use in the `/etc/hosts` entry.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition HostVolumeProperties
<a name="aws-properties-ecs-taskdefinition-hostvolumeproperties"></a>

The `HostVolumeProperties` property specifies details on a container instance bind mount host volume.

## Syntax
<a name="aws-properties-ecs-taskdefinition-hostvolumeproperties-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-hostvolumeproperties-syntax.json"></a>

```
{
  "[SourcePath](#cfn-ecs-taskdefinition-hostvolumeproperties-sourcepath)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-hostvolumeproperties-syntax.yaml"></a>

```
  [SourcePath](#cfn-ecs-taskdefinition-hostvolumeproperties-sourcepath): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-hostvolumeproperties-properties"></a>

`SourcePath`  <a name="cfn-ecs-taskdefinition-hostvolumeproperties-sourcepath"></a>
When the `host` parameter is used, specify a `sourcePath` to declare the path on the host container instance that's presented to the container. If this parameter is empty, then the Docker daemon has assigned a host path for you. If the `host` parameter contains a `sourcePath` file location, then the data volume persists at the specified location on the host container instance until you delete it manually. If the `sourcePath` value doesn't exist on the host container instance, the Docker daemon creates it. If the location does exist, the contents of the source path folder are exported.  
If you're using the Fargate launch type, the `sourcePath` parameter is not supported.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition KernelCapabilities
<a name="aws-properties-ecs-taskdefinition-kernelcapabilities"></a>

The Linux capabilities to add or remove from the default Docker configuration for a container defined in the task definition. For more detailed information about these Linux capabilities, see the [capabilities(7)](http://man7.org/linux/man-pages/man7/capabilities.7.html) Linux manual page.

The following describes how Docker processes the Linux capabilities specified in the `add` and `drop` request parameters. For information about the latest behavior, see [Docker Compose: order of cap\$1drop and cap\$1add](https://forums.docker.com/t/docker-compose-order-of-cap-drop-and-cap-add/97136/1) in the Docker Community Forum.
+ When the container is a privleged container, the container capabilities are all of the default Docker capabilities. The capabilities specified in the `add` request parameter, and the `drop` request parameter are ignored.
+ When the `add` request parameter is set to ALL, the container capabilities are all of the default Docker capabilities, excluding those specified in the `drop` request parameter.
+ When the `drop` request parameter is set to ALL, the container capabilities are the capabilities specified in the `add` request parameter.
+ When the `add` request parameter and the `drop` request parameter are both empty, the capabilities the container capabilities are all of the default Docker capabilities.
+ The default is to first drop the capabilities specified in the `drop` request parameter, and then add the capabilities specified in the `add` request parameter.

## Syntax
<a name="aws-properties-ecs-taskdefinition-kernelcapabilities-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-kernelcapabilities-syntax.json"></a>

```
{
  "[Add](#cfn-ecs-taskdefinition-kernelcapabilities-add)" : [ String, ... ],
  "[Drop](#cfn-ecs-taskdefinition-kernelcapabilities-drop)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-kernelcapabilities-syntax.yaml"></a>

```
  [Add](#cfn-ecs-taskdefinition-kernelcapabilities-add): 
    - String
  [Drop](#cfn-ecs-taskdefinition-kernelcapabilities-drop): 
    - String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-kernelcapabilities-properties"></a>

`Add`  <a name="cfn-ecs-taskdefinition-kernelcapabilities-add"></a>
The Linux capabilities for the container that have been added to the default configuration provided by Docker. This parameter maps to `CapAdd` in the docker container create command and the `--cap-add` option to docker run.  
Tasks launched on AWS Fargate only support adding the `SYS_PTRACE` kernel capability.
Valid values: `"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | "WAKE_ALARM"`  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Drop`  <a name="cfn-ecs-taskdefinition-kernelcapabilities-drop"></a>
The Linux capabilities for the container that have been removed from the default configuration provided by Docker. This parameter maps to `CapDrop` in the docker container create command and the `--cap-drop` option to docker run.  
Valid values: `"ALL" | "AUDIT_CONTROL" | "AUDIT_WRITE" | "BLOCK_SUSPEND" | "CHOWN" | "DAC_OVERRIDE" | "DAC_READ_SEARCH" | "FOWNER" | "FSETID" | "IPC_LOCK" | "IPC_OWNER" | "KILL" | "LEASE" | "LINUX_IMMUTABLE" | "MAC_ADMIN" | "MAC_OVERRIDE" | "MKNOD" | "NET_ADMIN" | "NET_BIND_SERVICE" | "NET_BROADCAST" | "NET_RAW" | "SETFCAP" | "SETGID" | "SETPCAP" | "SETUID" | "SYS_ADMIN" | "SYS_BOOT" | "SYS_CHROOT" | "SYS_MODULE" | "SYS_NICE" | "SYS_PACCT" | "SYS_PTRACE" | "SYS_RAWIO" | "SYS_RESOURCE" | "SYS_TIME" | "SYS_TTY_CONFIG" | "SYSLOG" | "WAKE_ALARM"`  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition KeyValuePair
<a name="aws-properties-ecs-taskdefinition-keyvaluepair"></a>

A key-value pair object.

## Syntax
<a name="aws-properties-ecs-taskdefinition-keyvaluepair-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-keyvaluepair-syntax.json"></a>

```
{
  "[Name](#cfn-ecs-taskdefinition-keyvaluepair-name)" : String,
  "[Value](#cfn-ecs-taskdefinition-keyvaluepair-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-keyvaluepair-syntax.yaml"></a>

```
  [Name](#cfn-ecs-taskdefinition-keyvaluepair-name): String
  [Value](#cfn-ecs-taskdefinition-keyvaluepair-value): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-keyvaluepair-properties"></a>

`Name`  <a name="cfn-ecs-taskdefinition-keyvaluepair-name"></a>
The name of the key-value pair. For environment variables, this is the name of the environment variable.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-ecs-taskdefinition-keyvaluepair-value"></a>
The value of the key-value pair. For environment variables, this is the value of the environment variable.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition LinuxParameters
<a name="aws-properties-ecs-taskdefinition-linuxparameters"></a>

The Linux-specific options that are applied to the container, such as Linux [KernelCapabilities](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_KernelCapabilities.html).

## Syntax
<a name="aws-properties-ecs-taskdefinition-linuxparameters-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-linuxparameters-syntax.json"></a>

```
{
  "[Capabilities](#cfn-ecs-taskdefinition-linuxparameters-capabilities)" : KernelCapabilities,
  "[Devices](#cfn-ecs-taskdefinition-linuxparameters-devices)" : [ Device, ... ],
  "[InitProcessEnabled](#cfn-ecs-taskdefinition-linuxparameters-initprocessenabled)" : Boolean,
  "[MaxSwap](#cfn-ecs-taskdefinition-linuxparameters-maxswap)" : Integer,
  "[SharedMemorySize](#cfn-ecs-taskdefinition-linuxparameters-sharedmemorysize)" : Integer,
  "[Swappiness](#cfn-ecs-taskdefinition-linuxparameters-swappiness)" : Integer,
  "[Tmpfs](#cfn-ecs-taskdefinition-linuxparameters-tmpfs)" : [ Tmpfs, ... ]
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-linuxparameters-syntax.yaml"></a>

```
  [Capabilities](#cfn-ecs-taskdefinition-linuxparameters-capabilities): 
    KernelCapabilities
  [Devices](#cfn-ecs-taskdefinition-linuxparameters-devices): 
    - Device
  [InitProcessEnabled](#cfn-ecs-taskdefinition-linuxparameters-initprocessenabled): Boolean
  [MaxSwap](#cfn-ecs-taskdefinition-linuxparameters-maxswap): Integer
  [SharedMemorySize](#cfn-ecs-taskdefinition-linuxparameters-sharedmemorysize): Integer
  [Swappiness](#cfn-ecs-taskdefinition-linuxparameters-swappiness): Integer
  [Tmpfs](#cfn-ecs-taskdefinition-linuxparameters-tmpfs): 
    - Tmpfs
```

## Properties
<a name="aws-properties-ecs-taskdefinition-linuxparameters-properties"></a>

`Capabilities`  <a name="cfn-ecs-taskdefinition-linuxparameters-capabilities"></a>
The Linux capabilities for the container that are added to or dropped from the default configuration provided by Docker.  
For tasks that use the Fargate launch type, `capabilities` is supported for all platform versions but the `add` parameter is only supported if using platform version 1.4.0 or later.
*Required*: No  
*Type*: [KernelCapabilities](aws-properties-ecs-taskdefinition-kernelcapabilities.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Devices`  <a name="cfn-ecs-taskdefinition-linuxparameters-devices"></a>
Any host devices to expose to the container. This parameter maps to `Devices` in the docker container create command and the `--device` option to docker run.  
If you're using tasks that use the Fargate launch type, the `devices` parameter isn't supported.
*Required*: No  
*Type*: Array of [Device](aws-properties-ecs-taskdefinition-device.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`InitProcessEnabled`  <a name="cfn-ecs-taskdefinition-linuxparameters-initprocessenabled"></a>
Run an `init` process inside the container that forwards signals and reaps processes. This parameter maps to the `--init` option to docker run. This parameter requires version 1.25 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MaxSwap`  <a name="cfn-ecs-taskdefinition-linuxparameters-maxswap"></a>
The total amount of swap memory (in MiB) a container can use. This parameter will be translated to the `--memory-swap` option to docker run where the value would be the sum of the container memory plus the `maxSwap` value.  
If a `maxSwap` value of `0` is specified, the container will not use swap. Accepted values are `0` or any positive integer. If the `maxSwap` parameter is omitted, the container will use the swap configuration for the container instance it is running on. A `maxSwap` value must be set for the `swappiness` parameter to be used.  
If you're using tasks that use the Fargate launch type, the `maxSwap` parameter isn't supported.  
If you're using tasks on Amazon Linux 2023 the `swappiness` parameter isn't supported.
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SharedMemorySize`  <a name="cfn-ecs-taskdefinition-linuxparameters-sharedmemorysize"></a>
The value for the size (in MiB) of the `/dev/shm` volume. This parameter maps to the `--shm-size` option to docker run.  
If you are using tasks that use the Fargate launch type, the `sharedMemorySize` parameter is not supported.
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Swappiness`  <a name="cfn-ecs-taskdefinition-linuxparameters-swappiness"></a>
This allows you to tune a container's memory swappiness behavior. A `swappiness` value of `0` will cause swapping to not happen unless absolutely necessary. A `swappiness` value of `100` will cause pages to be swapped very aggressively. Accepted values are whole numbers between `0` and `100`. If the `swappiness` parameter is not specified, a default value of `60` is used. If a value is not specified for `maxSwap` then this parameter is ignored. This parameter maps to the `--memory-swappiness` option to docker run.  
If you're using tasks that use the Fargate launch type, the `swappiness` parameter isn't supported.  
If you're using tasks on Amazon Linux 2023 the `swappiness` parameter isn't supported.
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tmpfs`  <a name="cfn-ecs-taskdefinition-linuxparameters-tmpfs"></a>
The container path, mount options, and size (in MiB) of the tmpfs mount. This parameter maps to the `--tmpfs` option to docker run.  
If you're using tasks that use the Fargate launch type, the `tmpfs` parameter isn't supported.
*Required*: No  
*Type*: [Array](aws-properties-ecs-taskdefinition-tmpfs.md) of [Tmpfs](aws-properties-ecs-taskdefinition-tmpfs.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition LogConfiguration
<a name="aws-properties-ecs-taskdefinition-logconfiguration"></a>

The `LogConfiguration` property specifies log configuration options to send to a custom log driver for the container.

## Syntax
<a name="aws-properties-ecs-taskdefinition-logconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-logconfiguration-syntax.json"></a>

```
{
  "[LogDriver](#cfn-ecs-taskdefinition-logconfiguration-logdriver)" : String,
  "[Options](#cfn-ecs-taskdefinition-logconfiguration-options)" : {Key: Value, ...},
  "[SecretOptions](#cfn-ecs-taskdefinition-logconfiguration-secretoptions)" : [ Secret, ... ]
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-logconfiguration-syntax.yaml"></a>

```
  [LogDriver](#cfn-ecs-taskdefinition-logconfiguration-logdriver): String
  [Options](#cfn-ecs-taskdefinition-logconfiguration-options): 
    Key: Value
  [SecretOptions](#cfn-ecs-taskdefinition-logconfiguration-secretoptions): 
    - Secret
```

## Properties
<a name="aws-properties-ecs-taskdefinition-logconfiguration-properties"></a>

`LogDriver`  <a name="cfn-ecs-taskdefinition-logconfiguration-logdriver"></a>
The log driver to use for the container.  
For tasks on AWS Fargate, the supported log drivers are `awslogs`, `splunk`, and `awsfirelens`.  
For tasks hosted on Amazon EC2 instances, the supported log drivers are `awslogs`, `fluentd`, `gelf`, `json-file`, `journald`, `syslog`, `splunk`, and `awsfirelens`.  
For more information about using the `awslogs` log driver, see [Send Amazon ECS logs to CloudWatch](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_awslogs.html) in the *Amazon Elastic Container Service Developer Guide*.  
For more information about using the `awsfirelens` log driver, see [Send Amazon ECS logs to an AWS service or AWS Partner](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_firelens.html).  
If you have a custom driver that isn't listed, you can fork the Amazon ECS container agent project that's [available on GitHub](https://github.com/aws/amazon-ecs-agent) and customize it to work with that driver. We encourage you to submit pull requests for changes that you would like to have included. However, we don't currently provide support for running modified copies of this software.
*Required*: Yes  
*Type*: String  
*Allowed values*: `json-file | syslog | journald | gelf | fluentd | awslogs | splunk | awsfirelens`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Options`  <a name="cfn-ecs-taskdefinition-logconfiguration-options"></a>
The configuration options to send to the log driver.  
The options you can specify depend on the log driver. Some of the options you can specify when you use the `awslogs` log driver to route logs to Amazon CloudWatch include the following:    
awslogs-create-group  
Required: No  
Specify whether you want the log group to be created automatically. If this option isn't specified, it defaults to `false`.  
Your IAM policy must include the `logs:CreateLogGroup` permission before you attempt to use `awslogs-create-group`.  
awslogs-region  
Required: Yes  
Specify the AWS Region that the `awslogs` log driver is to send your Docker logs to. You can choose to send all of your logs from clusters in different Regions to a single region in CloudWatch Logs. This is so that they're all visible in one location. Otherwise, you can separate them by Region for more granularity. Make sure that the specified log group exists in the Region that you specify with this option.  
awslogs-group  
Required: Yes  
Make sure to specify a log group that the `awslogs` log driver sends its log streams to.  
awslogs-stream-prefix  
Required: Yes, when using Fargate.Optional when using EC2.  
Use the `awslogs-stream-prefix` option to associate a log stream with the specified prefix, the container name, and the ID of the Amazon ECS task that the container belongs to. If you specify a prefix with this option, then the log stream takes the format `prefix-name/container-name/ecs-task-id`.  
If you don't specify a prefix with this option, then the log stream is named after the container ID that's assigned by the Docker daemon on the container instance. Because it's difficult to trace logs back to the container that sent them with just the Docker container ID (which is only available on the container instance), we recommend that you specify a prefix with this option.  
For Amazon ECS services, you can use the service name as the prefix. Doing so, you can trace log streams to the service that the container belongs to, the name of the container that sent them, and the ID of the task that the container belongs to.  
You must specify a stream-prefix for your logs to have your logs appear in the Log pane when using the Amazon ECS console.  
awslogs-datetime-format  
Required: No  
This option defines a multiline start pattern in Python `strftime` format. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages.  
One example of a use case for using this format is for parsing output such as a stack dump, which might otherwise be logged in multiple entries. The correct pattern allows it to be captured in a single entry.  
For more information, see [awslogs-datetime-format](https://docs.docker.com/config/containers/logging/awslogs/#awslogs-datetime-format).  
You cannot configure both the `awslogs-datetime-format` and `awslogs-multiline-pattern` options.  
Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance.  
awslogs-multiline-pattern  
Required: No  
This option defines a multiline start pattern that uses a regular expression. A log message consists of a line that matches the pattern and any following lines that don’t match the pattern. The matched line is the delimiter between log messages.  
For more information, see [awslogs-multiline-pattern](https://docs.docker.com/config/containers/logging/awslogs/#awslogs-multiline-pattern).  
This option is ignored if `awslogs-datetime-format` is also configured.  
You cannot configure both the `awslogs-datetime-format` and `awslogs-multiline-pattern` options.  
Multiline logging performs regular expression parsing and matching of all log messages. This might have a negative impact on logging performance.
The following options apply to all supported log drivers.    
mode  
Required: No  
Valid values: `non-blocking` \$1 `blocking`  
This option defines the delivery mode of log messages from the container to the log driver specified using `logDriver`. The delivery mode you choose affects application availability when the flow of logs from container is interrupted.  
If you use the `blocking` mode and the flow of logs is interrupted, calls from container code to write to the `stdout` and `stderr` streams will block. The logging thread of the application will block as a result. This may cause the application to become unresponsive and lead to container healthcheck failure.   
If you use the `non-blocking` mode, the container's logs are instead stored in an in-memory intermediate buffer configured with the `max-buffer-size` option. This prevents the application from becoming unresponsive when logs cannot be sent. We recommend using this mode if you want to ensure service availability and are okay with some log loss. For more information, see [Preventing log loss with non-blocking mode in the `awslogs` container log driver](https://aws.amazon.com/blogs/containers/preventing-log-loss-with-non-blocking-mode-in-the-awslogs-container-log-driver/).  
You can set a default `mode` for all containers in a specific AWS Region by using the `defaultLogDriverMode` account setting. If you don't specify the `mode` option or configure the account setting, Amazon ECS will default to the `non-blocking` mode. For more information about the account setting, see [Default log driver mode](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#default-log-driver-mode) in the *Amazon Elastic Container Service Developer Guide*.  
On June 25, 2025, Amazon ECS changed the default log driver mode from `blocking` to `non-blocking` to prioritize task availability over logging. To continue using the `blocking` mode after this change, do one of the following:  
+ Set the `mode` option in your container definition's `logConfiguration` as `blocking`.
+ Set the `defaultLogDriverMode` account setting to `blocking`.  
max-buffer-size  
Required: No  
Default value: `10m`  
When `non-blocking` mode is used, the `max-buffer-size` log option controls the size of the buffer that's used for intermediate message storage. Make sure to specify an adequate buffer size based on your application. When the buffer fills up, further logs cannot be stored. Logs that cannot be stored are lost. 
To route logs using the `splunk` log router, you need to specify a `splunk-token` and a `splunk-url`.  
When you use the `awsfirelens` log router to route logs to an AWS Service or AWS Partner Network destination for log storage and analytics, you can set the `log-driver-buffer-limit` option to limit the number of events that are buffered in memory, before being sent to the log router container. It can help to resolve potential log loss issue because high throughput might result in memory running out for the buffer inside of Docker.  
Other options you can specify when using `awsfirelens` to route logs depend on the destination. When you export logs to Amazon Data Firehose, you can specify the AWS Region with `region` and a name for the log stream with `delivery_stream`.  
When you export logs to Amazon Kinesis Data Streams, you can specify an AWS Region with `region` and a data stream name with `stream`.  
 When you export logs to Amazon OpenSearch Service, you can specify options like `Name`, `Host` (OpenSearch Service endpoint without protocol), `Port`, `Index`, `Type`, `Aws_auth`, `Aws_region`, `Suppress_Type_Name`, and `tls`. For more information, see [Under the hood: FireLens for Amazon ECS Tasks](https://aws.amazon.com/blogs/containers/under-the-hood-firelens-for-amazon-ecs-tasks/).  
When you export logs to Amazon S3, you can specify the bucket using the `bucket` option. You can also specify `region`, `total_file_size`, `upload_timeout`, and `use_put_object` as options.  
This parameter requires version 1.19 of the Docker Remote API or greater on your container instance. To check the Docker Remote API version on your container instance, log in to your container instance and run the following command: `sudo docker version --format '{{.Server.APIVersion}}'`  
*Required*: No  
*Type*: Object of String  
*Pattern*: `.{1,}`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SecretOptions`  <a name="cfn-ecs-taskdefinition-logconfiguration-secretoptions"></a>
The secrets to pass to the log configuration. For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: Array of [Secret](aws-properties-ecs-taskdefinition-secret.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition MountPoint
<a name="aws-properties-ecs-taskdefinition-mountpoint"></a>

The details for a volume mount point that's used in a container definition.

## Syntax
<a name="aws-properties-ecs-taskdefinition-mountpoint-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-mountpoint-syntax.json"></a>

```
{
  "[ContainerPath](#cfn-ecs-taskdefinition-mountpoint-containerpath)" : String,
  "[ReadOnly](#cfn-ecs-taskdefinition-mountpoint-readonly)" : Boolean,
  "[SourceVolume](#cfn-ecs-taskdefinition-mountpoint-sourcevolume)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-mountpoint-syntax.yaml"></a>

```
  [ContainerPath](#cfn-ecs-taskdefinition-mountpoint-containerpath): String
  [ReadOnly](#cfn-ecs-taskdefinition-mountpoint-readonly): Boolean
  [SourceVolume](#cfn-ecs-taskdefinition-mountpoint-sourcevolume): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-mountpoint-properties"></a>

`ContainerPath`  <a name="cfn-ecs-taskdefinition-mountpoint-containerpath"></a>
The path on the container to mount the host volume at.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ReadOnly`  <a name="cfn-ecs-taskdefinition-mountpoint-readonly"></a>
If this value is `true`, the container has read-only access to the volume. If this value is `false`, then the container can write to the volume. The default value is `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceVolume`  <a name="cfn-ecs-taskdefinition-mountpoint-sourcevolume"></a>
The name of the volume to mount. Must be a volume name referenced in the `name` parameter of task definition `volume`.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition PortMapping
<a name="aws-properties-ecs-taskdefinition-portmapping"></a>

The `PortMapping` property specifies a port mapping. Port mappings allow containers to access ports on the host container instance to send or receive traffic. Port mappings are specified as part of the container definition.

If you are using containers in a task with the `awsvpc` or `host` network mode, exposed ports should be specified using `containerPort`. The `hostPort` can be left blank or it must be the same value as the `containerPort`.

After a task reaches the `RUNNING` status, manual and automatic host and container port assignments are visible in the `networkBindings` section of [DescribeTasks](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html) API responses.

## Syntax
<a name="aws-properties-ecs-taskdefinition-portmapping-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-portmapping-syntax.json"></a>

```
{
  "[AppProtocol](#cfn-ecs-taskdefinition-portmapping-appprotocol)" : String,
  "[ContainerPort](#cfn-ecs-taskdefinition-portmapping-containerport)" : Integer,
  "[ContainerPortRange](#cfn-ecs-taskdefinition-portmapping-containerportrange)" : String,
  "[HostPort](#cfn-ecs-taskdefinition-portmapping-hostport)" : Integer,
  "[Name](#cfn-ecs-taskdefinition-portmapping-name)" : String,
  "[Protocol](#cfn-ecs-taskdefinition-portmapping-protocol)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-portmapping-syntax.yaml"></a>

```
  [AppProtocol](#cfn-ecs-taskdefinition-portmapping-appprotocol): String
  [ContainerPort](#cfn-ecs-taskdefinition-portmapping-containerport): Integer
  [ContainerPortRange](#cfn-ecs-taskdefinition-portmapping-containerportrange): String
  [HostPort](#cfn-ecs-taskdefinition-portmapping-hostport): Integer
  [Name](#cfn-ecs-taskdefinition-portmapping-name): String
  [Protocol](#cfn-ecs-taskdefinition-portmapping-protocol): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-portmapping-properties"></a>

`AppProtocol`  <a name="cfn-ecs-taskdefinition-portmapping-appprotocol"></a>
The application protocol that's used for the port mapping. This parameter only applies to Service Connect. We recommend that you set this parameter to be consistent with the protocol that your application uses. If you set this parameter, Amazon ECS adds protocol-specific connection handling to the Service Connect proxy. If you set this parameter, Amazon ECS adds protocol-specific telemetry in the Amazon ECS console and CloudWatch.  
If you don't set a value for this parameter, then TCP is used. However, Amazon ECS doesn't add protocol-specific telemetry for TCP.  
`appProtocol` is immutable in a Service Connect service. Updating this field requires a service deletion and redeployment.  
Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see [Service Connect](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: String  
*Allowed values*: `http | http2 | grpc`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ContainerPort`  <a name="cfn-ecs-taskdefinition-portmapping-containerport"></a>
The port number on the container that's bound to the user-specified or automatically assigned host port.  
If you use containers in a task with the `awsvpc` or `host` network mode, specify the exposed ports using `containerPort`.  
If you use containers in a task with the `bridge` network mode and you specify a container port and not a host port, your container automatically receives a host port in the ephemeral port range. For more information, see `hostPort`. Port mappings that are automatically assigned in this way do not count toward the 100 reserved ports limit of a container instance.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ContainerPortRange`  <a name="cfn-ecs-taskdefinition-portmapping-containerportrange"></a>
The port number range on the container that's bound to the dynamically mapped host port range.   
The following rules apply when you specify a `containerPortRange`:  
+ You must use either the `bridge` network mode or the `awsvpc` network mode.
+ This parameter is available for both the EC2 and AWS Fargate launch types.
+ This parameter is available for both the Linux and Windows operating systems.
+ The container instance must have at least version 1.67.0 of the container agent and at least version 1.67.0-1 of the `ecs-init` package 
+ You can specify a maximum of 100 port ranges per container.
+ You do not specify a `hostPortRange`. The value of the `hostPortRange` is set as follows:
  + For containers in a task with the `awsvpc` network mode, the `hostPortRange` is set to the same value as the `containerPortRange`. This is a static mapping strategy.
  + For containers in a task with the `bridge` network mode, the Amazon ECS agent finds open host ports from the default ephemeral range and passes it to docker to bind them to the container ports.
+ The `containerPortRange` valid values are between 1 and 65535.
+ A port can only be included in one port mapping per container.
+ You cannot specify overlapping port ranges.
+ The first port in the range must be less than last port in the range.
+ Docker recommends that you turn off the docker-proxy in the Docker daemon config file when you have a large number of ports.

  For more information, see [ Issue \$111185](https://github.com/moby/moby/issues/11185) on the Github website.

  For information about how to turn off the docker-proxy in the Docker daemon config file, see [Docker daemon](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/bootstrap_container_instance.html#bootstrap_docker_daemon) in the *Amazon ECS Developer Guide*.
You can call [https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html) to view the `hostPortRange` which are the host ports that are bound to the container ports.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`HostPort`  <a name="cfn-ecs-taskdefinition-portmapping-hostport"></a>
The port number on the container instance to reserve for your container.  
If you specify a `containerPortRange`, leave this field empty and the value of the `hostPort` is set as follows:  
+ For containers in a task with the `awsvpc` network mode, the `hostPort` is set to the same value as the `containerPort`. This is a static mapping strategy.
+ For containers in a task with the `bridge` network mode, the Amazon ECS agent finds open ports on the host and automatically binds them to the container ports. This is a dynamic mapping strategy.
If you use containers in a task with the `awsvpc` or `host` network mode, the `hostPort` can either be left blank or set to the same value as the `containerPort`.  
If you use containers in a task with the `bridge` network mode, you can specify a non-reserved host port for your container port mapping, or you can omit the `hostPort` (or set it to `0`) while specifying a `containerPort` and your container automatically receives a port in the ephemeral port range for your container instance operating system and Docker version.  
The default ephemeral port range for Docker version 1.6.0 and later is listed on the instance under `/proc/sys/net/ipv4/ip_local_port_range`. If this kernel parameter is unavailable, the default ephemeral port range from 49153 through 65535 (Linux) or 49152 through 65535 (Windows) is used. Do not attempt to specify a host port in the ephemeral port range as these are reserved for automatic assignment. In general, ports below 32768 are outside of the ephemeral port range.  
The default reserved ports are 22 for SSH, the Docker ports 2375 and 2376, and the Amazon ECS container agent ports 51678-51680. Any host port that was previously specified in a running task is also reserved while the task is running. That is, after a task stops, the host port is released. The current reserved ports are displayed in the `remainingResources` of [DescribeContainerInstances](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeContainerInstances.html) output. A container instance can have up to 100 reserved ports at a time. This number includes the default reserved ports. Automatically assigned ports aren't included in the 100 reserved ports quota.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-ecs-taskdefinition-portmapping-name"></a>
The name that's used for the port mapping. This parameter is the name that you use in the `serviceConnectConfiguration` and the `vpcLatticeConfigurations` of a service. The name can include up to 64 characters. The characters can include lowercase letters, numbers, underscores (\$1), and hyphens (-). The name can't start with a hyphen.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Protocol`  <a name="cfn-ecs-taskdefinition-portmapping-protocol"></a>
The protocol used for the port mapping. Valid values are `tcp` and `udp`. The default is `tcp`. `protocol` is immutable in a Service Connect service. Updating this field requires a service deletion and redeployment.   
*Required*: No  
*Type*: String  
*Allowed values*: `tcp | udp`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition ProxyConfiguration
<a name="aws-properties-ecs-taskdefinition-proxyconfiguration"></a>

The configuration details for the App Mesh proxy.

For tasks that use the EC2 launch type, the container instances require at least version 1.26.0 of the container agent and at least version 1.26.0-1 of the `ecs-init` package to use a proxy configuration. If your container instances are launched from the Amazon ECS optimized AMI version `20190301` or later, then they contain the required versions of the container agent and `ecs-init`. For more information, see [Amazon ECS-optimized Linux AMI](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-optimized_AMI.html)

## Syntax
<a name="aws-properties-ecs-taskdefinition-proxyconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-proxyconfiguration-syntax.json"></a>

```
{
  "[ContainerName](#cfn-ecs-taskdefinition-proxyconfiguration-containername)" : String,
  "[ProxyConfigurationProperties](#cfn-ecs-taskdefinition-proxyconfiguration-proxyconfigurationproperties)" : [ KeyValuePair, ... ],
  "[Type](#cfn-ecs-taskdefinition-proxyconfiguration-type)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-proxyconfiguration-syntax.yaml"></a>

```
  [ContainerName](#cfn-ecs-taskdefinition-proxyconfiguration-containername): String
  [ProxyConfigurationProperties](#cfn-ecs-taskdefinition-proxyconfiguration-proxyconfigurationproperties): 
    - KeyValuePair
  [Type](#cfn-ecs-taskdefinition-proxyconfiguration-type): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-proxyconfiguration-properties"></a>

`ContainerName`  <a name="cfn-ecs-taskdefinition-proxyconfiguration-containername"></a>
The name of the container that will serve as the App Mesh proxy.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ProxyConfigurationProperties`  <a name="cfn-ecs-taskdefinition-proxyconfiguration-proxyconfigurationproperties"></a>
The set of network configuration parameters to provide the Container Network Interface (CNI) plugin, specified as key-value pairs.  
+ `IgnoredUID` - (Required) The user ID (UID) of the proxy container as defined by the `user` parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If `IgnoredGID` is specified, this field can be empty.
+ `IgnoredGID` - (Required) The group ID (GID) of the proxy container as defined by the `user` parameter in a container definition. This is used to ensure the proxy ignores its own traffic. If `IgnoredUID` is specified, this field can be empty.
+ `AppPorts` - (Required) The list of ports that the application uses. Network traffic to these ports is forwarded to the `ProxyIngressPort` and `ProxyEgressPort`.
+ `ProxyIngressPort` - (Required) Specifies the port that incoming traffic to the `AppPorts` is directed to.
+ `ProxyEgressPort` - (Required) Specifies the port that outgoing traffic from the `AppPorts` is directed to.
+ `EgressIgnoredPorts` - (Required) The egress traffic going to the specified ports is ignored and not redirected to the `ProxyEgressPort`. It can be an empty list.
+ `EgressIgnoredIPs` - (Required) The egress traffic going to the specified IP addresses is ignored and not redirected to the `ProxyEgressPort`. It can be an empty list.
*Required*: No  
*Type*: Array of [KeyValuePair](aws-properties-ecs-taskdefinition-keyvaluepair.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Type`  <a name="cfn-ecs-taskdefinition-proxyconfiguration-type"></a>
The proxy type. The only supported value is `APPMESH`.  
*Required*: No  
*Type*: String  
*Allowed values*: `APPMESH`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition RepositoryCredentials
<a name="aws-properties-ecs-taskdefinition-repositorycredentials"></a>

The repository credentials for private registry authentication.

## Syntax
<a name="aws-properties-ecs-taskdefinition-repositorycredentials-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-repositorycredentials-syntax.json"></a>

```
{
  "[CredentialsParameter](#cfn-ecs-taskdefinition-repositorycredentials-credentialsparameter)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-repositorycredentials-syntax.yaml"></a>

```
  [CredentialsParameter](#cfn-ecs-taskdefinition-repositorycredentials-credentialsparameter): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-repositorycredentials-properties"></a>

`CredentialsParameter`  <a name="cfn-ecs-taskdefinition-repositorycredentials-credentialsparameter"></a>
The Amazon Resource Name (ARN) of the secret containing the private repository credentials.  
When you use the Amazon ECS API, AWS CLI, or AWS SDK, if the secret exists in the same Region as the task that you're launching then you can use either the full ARN or the name of the secret. When you use the AWS Management Console, you must specify the full ARN of the secret.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition ResourceRequirement
<a name="aws-properties-ecs-taskdefinition-resourcerequirement"></a>

The type and amount of a resource to assign to a container. The supported resource types are GPUs and Elastic Inference accelerators. For more information, see [Working with GPUs on Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-gpu.html) or [Working with Amazon Elastic Inference on Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-inference.html) in the *Amazon Elastic Container Service Developer Guide*

## Syntax
<a name="aws-properties-ecs-taskdefinition-resourcerequirement-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-resourcerequirement-syntax.json"></a>

```
{
  "[Type](#cfn-ecs-taskdefinition-resourcerequirement-type)" : String,
  "[Value](#cfn-ecs-taskdefinition-resourcerequirement-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-resourcerequirement-syntax.yaml"></a>

```
  [Type](#cfn-ecs-taskdefinition-resourcerequirement-type): String
  [Value](#cfn-ecs-taskdefinition-resourcerequirement-value): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-resourcerequirement-properties"></a>

`Type`  <a name="cfn-ecs-taskdefinition-resourcerequirement-type"></a>
The type of resource to assign to a container.   
*Required*: Yes  
*Type*: String  
*Allowed values*: `GPU | InferenceAccelerator`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-ecs-taskdefinition-resourcerequirement-value"></a>
The value for the specified resource type.  
When the type is `GPU`, the value is the number of physical `GPUs` the Amazon ECS container agent reserves for the container. The number of GPUs that's reserved for all containers in a task can't exceed the number of available GPUs on the container instance that the task is launched on.  
When the type is `InferenceAccelerator`, the `value` matches the `deviceName` for an [InferenceAccelerator](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_InferenceAccelerator.html) specified in a task definition.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition RestartPolicy
<a name="aws-properties-ecs-taskdefinition-restartpolicy"></a>

You can enable a restart policy for each container defined in your task definition, to overcome transient failures faster and maintain task availability. When you enable a restart policy for a container, Amazon ECS can restart the container if it exits, without needing to replace the task. For more information, see [Restart individual containers in Amazon ECS tasks with container restart policies](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/container-restart-policy.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-taskdefinition-restartpolicy-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-restartpolicy-syntax.json"></a>

```
{
  "[Enabled](#cfn-ecs-taskdefinition-restartpolicy-enabled)" : Boolean,
  "[IgnoredExitCodes](#cfn-ecs-taskdefinition-restartpolicy-ignoredexitcodes)" : [ Integer, ... ],
  "[RestartAttemptPeriod](#cfn-ecs-taskdefinition-restartpolicy-restartattemptperiod)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-restartpolicy-syntax.yaml"></a>

```
  [Enabled](#cfn-ecs-taskdefinition-restartpolicy-enabled): Boolean
  [IgnoredExitCodes](#cfn-ecs-taskdefinition-restartpolicy-ignoredexitcodes): 
    - Integer
  [RestartAttemptPeriod](#cfn-ecs-taskdefinition-restartpolicy-restartattemptperiod): Integer
```

## Properties
<a name="aws-properties-ecs-taskdefinition-restartpolicy-properties"></a>

`Enabled`  <a name="cfn-ecs-taskdefinition-restartpolicy-enabled"></a>
Specifies whether a restart policy is enabled for the container.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`IgnoredExitCodes`  <a name="cfn-ecs-taskdefinition-restartpolicy-ignoredexitcodes"></a>
A list of exit codes that Amazon ECS will ignore and not attempt a restart on. You can specify a maximum of 50 container exit codes. By default, Amazon ECS does not ignore any exit codes.  
*Required*: No  
*Type*: Array of Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RestartAttemptPeriod`  <a name="cfn-ecs-taskdefinition-restartpolicy-restartattemptperiod"></a>
A period of time (in seconds) that the container must run for before a restart can be attempted. A container can be restarted only once every `restartAttemptPeriod` seconds. If a container isn't able to run for this time period and exits early, it will not be restarted. You can set a minimum `restartAttemptPeriod` of 60 seconds and a maximum `restartAttemptPeriod` of 1800 seconds. By default, a container must run for 300 seconds before it can be restarted.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition RuntimePlatform
<a name="aws-properties-ecs-taskdefinition-runtimeplatform"></a>

Information about the platform for the Amazon ECS service or task.

For more information about `RuntimePlatform`, see [RuntimePlatform](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#runtime-platform) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-taskdefinition-runtimeplatform-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-runtimeplatform-syntax.json"></a>

```
{
  "[CpuArchitecture](#cfn-ecs-taskdefinition-runtimeplatform-cpuarchitecture)" : String,
  "[OperatingSystemFamily](#cfn-ecs-taskdefinition-runtimeplatform-operatingsystemfamily)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-runtimeplatform-syntax.yaml"></a>

```
  [CpuArchitecture](#cfn-ecs-taskdefinition-runtimeplatform-cpuarchitecture): String
  [OperatingSystemFamily](#cfn-ecs-taskdefinition-runtimeplatform-operatingsystemfamily): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-runtimeplatform-properties"></a>

`CpuArchitecture`  <a name="cfn-ecs-taskdefinition-runtimeplatform-cpuarchitecture"></a>
The CPU architecture.  
You can run your Linux tasks on an ARM-based platform by setting the value to `ARM64`. This option is available for tasks that run on Linux Amazon EC2 instance, Amazon ECS Managed Instances, or Linux containers on Fargate.  
*Required*: No  
*Type*: String  
*Allowed values*: `X86_64 | ARM64`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`OperatingSystemFamily`  <a name="cfn-ecs-taskdefinition-runtimeplatform-operatingsystemfamily"></a>
The operating system.  
*Required*: No  
*Type*: String  
*Allowed values*: `WINDOWS_SERVER_2019_FULL | WINDOWS_SERVER_2019_CORE | WINDOWS_SERVER_2016_FULL | WINDOWS_SERVER_2004_CORE | WINDOWS_SERVER_2022_CORE | WINDOWS_SERVER_2022_FULL | WINDOWS_SERVER_2025_CORE | WINDOWS_SERVER_2025_FULL | WINDOWS_SERVER_20H2_CORE | LINUX`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition S3FilesVolumeConfiguration
<a name="aws-properties-ecs-taskdefinition-s3filesvolumeconfiguration"></a>

<a name="aws-properties-ecs-taskdefinition-s3filesvolumeconfiguration-description"></a>The `S3FilesVolumeConfiguration` property type specifies Property description not available. for an [AWS::ECS::TaskDefinition](aws-resource-ecs-taskdefinition.md).

## Syntax
<a name="aws-properties-ecs-taskdefinition-s3filesvolumeconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-s3filesvolumeconfiguration-syntax.json"></a>

```
{
  "[AccessPointArn](#cfn-ecs-taskdefinition-s3filesvolumeconfiguration-accesspointarn)" : String,
  "[FileSystemArn](#cfn-ecs-taskdefinition-s3filesvolumeconfiguration-filesystemarn)" : String,
  "[RootDirectory](#cfn-ecs-taskdefinition-s3filesvolumeconfiguration-rootdirectory)" : String,
  "[TransitEncryptionPort](#cfn-ecs-taskdefinition-s3filesvolumeconfiguration-transitencryptionport)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-s3filesvolumeconfiguration-syntax.yaml"></a>

```
  [AccessPointArn](#cfn-ecs-taskdefinition-s3filesvolumeconfiguration-accesspointarn): String
  [FileSystemArn](#cfn-ecs-taskdefinition-s3filesvolumeconfiguration-filesystemarn): String
  [RootDirectory](#cfn-ecs-taskdefinition-s3filesvolumeconfiguration-rootdirectory): String
  [TransitEncryptionPort](#cfn-ecs-taskdefinition-s3filesvolumeconfiguration-transitencryptionport): Integer
```

## Properties
<a name="aws-properties-ecs-taskdefinition-s3filesvolumeconfiguration-properties"></a>

`AccessPointArn`  <a name="cfn-ecs-taskdefinition-s3filesvolumeconfiguration-accesspointarn"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FileSystemArn`  <a name="cfn-ecs-taskdefinition-s3filesvolumeconfiguration-filesystemarn"></a>
Property description not available.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RootDirectory`  <a name="cfn-ecs-taskdefinition-s3filesvolumeconfiguration-rootdirectory"></a>
Property description not available.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TransitEncryptionPort`  <a name="cfn-ecs-taskdefinition-s3filesvolumeconfiguration-transitencryptionport"></a>
Property description not available.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition Secret
<a name="aws-properties-ecs-taskdefinition-secret"></a>

An object representing the secret to expose to your container. Secrets can be exposed to a container in the following ways:
+ To inject sensitive data into your containers as environment variables, use the `secrets` container definition parameter.
+ To reference sensitive information in the log configuration of a container, use the `secretOptions` container definition parameter.

For more information, see [Specifying sensitive data](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-taskdefinition-secret-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-secret-syntax.json"></a>

```
{
  "[Name](#cfn-ecs-taskdefinition-secret-name)" : String,
  "[ValueFrom](#cfn-ecs-taskdefinition-secret-valuefrom)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-secret-syntax.yaml"></a>

```
  [Name](#cfn-ecs-taskdefinition-secret-name): String
  [ValueFrom](#cfn-ecs-taskdefinition-secret-valuefrom): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-secret-properties"></a>

`Name`  <a name="cfn-ecs-taskdefinition-secret-name"></a>
The name of the secret.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ValueFrom`  <a name="cfn-ecs-taskdefinition-secret-valuefrom"></a>
The secret to expose to the container. The supported values are either the full ARN of the AWS Secrets Manager secret or the full ARN of the parameter in the SSM Parameter Store.  
For information about the require AWS Identity and Access Management permissions, see [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-secrets.html#secrets-iam) (for Secrets Manager) or [Required IAM permissions for Amazon ECS secrets](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/specifying-sensitive-data-parameters.html) (for Systems Manager Parameter store) in the *Amazon Elastic Container Service Developer Guide*.  
If the SSM Parameter Store parameter exists in the same Region as the task you're launching, then you can use either the full ARN or name of the parameter. If the parameter exists in a different Region, then the full ARN must be specified.
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition SystemControl
<a name="aws-properties-ecs-taskdefinition-systemcontrol"></a>

A list of namespaced kernel parameters to set in the container. This parameter maps to `Sysctls` in the docker container create command and the `--sysctl` option to docker run. For example, you can configure `net.ipv4.tcp_keepalive_time` setting to maintain longer lived connections.

We don't recommend that you specify network-related `systemControls` parameters for multiple containers in a single task that also uses either the `awsvpc` or `host` network mode. Doing this has the following disadvantages:
+ For tasks that use the `awsvpc` network mode including Fargate, if you set `systemControls` for any container, it applies to all containers in the task. If you set different `systemControls` for multiple containers in a single task, the container that's started last determines which `systemControls` take effect.
+ For tasks that use the `host` network mode, the network namespace `systemControls` aren't supported.

If you're setting an IPC resource namespace to use for the containers in the task, the following conditions apply to your system controls. For more information, see [IPC mode](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#task_definition_ipcmode).
+ For tasks that use the `host` IPC mode, IPC namespace `systemControls` aren't supported.
+ For tasks that use the `task` IPC mode, IPC namespace `systemControls` values apply to all containers within a task.

**Note**  
This parameter is not supported for Windows containers.

**Note**  
This parameter is only supported for tasks that are hosted on AWS Fargate if the tasks are using platform version `1.4.0` or later (Linux). This isn't supported for Windows containers on Fargate.

## Syntax
<a name="aws-properties-ecs-taskdefinition-systemcontrol-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-systemcontrol-syntax.json"></a>

```
{
  "[Namespace](#cfn-ecs-taskdefinition-systemcontrol-namespace)" : String,
  "[Value](#cfn-ecs-taskdefinition-systemcontrol-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-systemcontrol-syntax.yaml"></a>

```
  [Namespace](#cfn-ecs-taskdefinition-systemcontrol-namespace): String
  [Value](#cfn-ecs-taskdefinition-systemcontrol-value): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-systemcontrol-properties"></a>

`Namespace`  <a name="cfn-ecs-taskdefinition-systemcontrol-namespace"></a>
The namespaced kernel parameter to set a `value` for.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Value`  <a name="cfn-ecs-taskdefinition-systemcontrol-value"></a>
The namespaced kernel parameter to set a `value` for.  
Valid IPC namespace values: `"kernel.msgmax" | "kernel.msgmnb" | "kernel.msgmni" | "kernel.sem" | "kernel.shmall" | "kernel.shmmax" | "kernel.shmmni" | "kernel.shm_rmid_forced"`, and `Sysctls` that start with `"fs.mqueue.*"`  
Valid network namespace values: `Sysctls` that start with `"net.*"`. Only namespaced `Sysctls` that exist within the container starting with "net.\$1 are accepted.  
All of these values are supported by Fargate.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition Tag
<a name="aws-properties-ecs-taskdefinition-tag"></a>

The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

The following basic restrictions apply to tags:
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

## Syntax
<a name="aws-properties-ecs-taskdefinition-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-tag-syntax.json"></a>

```
{
  "[Key](#cfn-ecs-taskdefinition-tag-key)" : String,
  "[Value](#cfn-ecs-taskdefinition-tag-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-tag-syntax.yaml"></a>

```
  [Key](#cfn-ecs-taskdefinition-tag-key): String
  [Value](#cfn-ecs-taskdefinition-tag-value): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-tag-properties"></a>

`Key`  <a name="cfn-ecs-taskdefinition-tag-key"></a>
One part of a key-value pair that make up a tag. A `key` is a general label that acts like a category for more specific tag values.  
*Required*: No  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ecs-taskdefinition-tag-value"></a>
The optional part of a key-value pair that make up a tag. A `value` acts as a descriptor within a tag category (key).  
*Required*: No  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

## See also
<a name="aws-properties-ecs-taskdefinition-tag--seealso"></a>
+  [Create an Amazon ECS task definition for the Fargate launch type](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-taskdefinition.html#aws-resource-ecs-taskdefinition--examples--Create_an__task_definition_for_the__launch_type) 

# AWS::ECS::TaskDefinition TaskDefinitionPlacementConstraint
<a name="aws-properties-ecs-taskdefinition-taskdefinitionplacementconstraint"></a>

The constraint on task placement in the task definition. For more information, see [Task placement constraints](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-constraints.html) in the *Amazon Elastic Container Service Developer Guide*.

**Note**  
Task placement constraints aren't supported for tasks run on AWS Fargate.

## Syntax
<a name="aws-properties-ecs-taskdefinition-taskdefinitionplacementconstraint-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-taskdefinitionplacementconstraint-syntax.json"></a>

```
{
  "[Expression](#cfn-ecs-taskdefinition-taskdefinitionplacementconstraint-expression)" : String,
  "[Type](#cfn-ecs-taskdefinition-taskdefinitionplacementconstraint-type)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-taskdefinitionplacementconstraint-syntax.yaml"></a>

```
  [Expression](#cfn-ecs-taskdefinition-taskdefinitionplacementconstraint-expression): String
  [Type](#cfn-ecs-taskdefinition-taskdefinitionplacementconstraint-type): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-taskdefinitionplacementconstraint-properties"></a>

`Expression`  <a name="cfn-ecs-taskdefinition-taskdefinitionplacementconstraint-expression"></a>
A cluster query language expression to apply to the constraint. For more information, see [Cluster query language](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-query-language.html) in the *Amazon Elastic Container Service Developer Guide*.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Type`  <a name="cfn-ecs-taskdefinition-taskdefinitionplacementconstraint-type"></a>
The type of constraint. The `MemberOf` constraint restricts selection to be from a group of valid candidates.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `memberOf`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition Tmpfs
<a name="aws-properties-ecs-taskdefinition-tmpfs"></a>

The container path, mount options, and size of the tmpfs mount.

## Syntax
<a name="aws-properties-ecs-taskdefinition-tmpfs-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-tmpfs-syntax.json"></a>

```
{
  "[ContainerPath](#cfn-ecs-taskdefinition-tmpfs-containerpath)" : String,
  "[MountOptions](#cfn-ecs-taskdefinition-tmpfs-mountoptions)" : [ String, ... ],
  "[Size](#cfn-ecs-taskdefinition-tmpfs-size)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-tmpfs-syntax.yaml"></a>

```
  [ContainerPath](#cfn-ecs-taskdefinition-tmpfs-containerpath): String
  [MountOptions](#cfn-ecs-taskdefinition-tmpfs-mountoptions): 
    - String
  [Size](#cfn-ecs-taskdefinition-tmpfs-size): Integer
```

## Properties
<a name="aws-properties-ecs-taskdefinition-tmpfs-properties"></a>

`ContainerPath`  <a name="cfn-ecs-taskdefinition-tmpfs-containerpath"></a>
The absolute file path where the tmpfs volume is to be mounted.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`MountOptions`  <a name="cfn-ecs-taskdefinition-tmpfs-mountoptions"></a>
The list of tmpfs volume mount options.  
Valid values: `"defaults" | "ro" | "rw" | "suid" | "nosuid" | "dev" | "nodev" | "exec" | "noexec" | "sync" | "async" | "dirsync" | "remount" | "mand" | "nomand" | "atime" | "noatime" | "diratime" | "nodiratime" | "bind" | "rbind" | "unbindable" | "runbindable" | "private" | "rprivate" | "shared" | "rshared" | "slave" | "rslave" | "relatime" | "norelatime" | "strictatime" | "nostrictatime" | "mode" | "uid" | "gid" | "nr_inodes" | "nr_blocks" | "mpol"`  
*Required*: No  
*Type*: Array of String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Size`  <a name="cfn-ecs-taskdefinition-tmpfs-size"></a>
The maximum size (in MiB) of the tmpfs volume.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition Ulimit
<a name="aws-properties-ecs-taskdefinition-ulimit"></a>

The `ulimit` settings to pass to the container.

Amazon ECS tasks hosted on AWS Fargate use the default resource limit values set by the operating system with the exception of the `nofile` resource limit parameter which AWS Fargate overrides. The `nofile` resource limit sets a restriction on the number of open files that a container can use. The default `nofile` soft limit is ` 65535` and the default hard limit is `65535`.

You can specify the `ulimit` settings for a container in a task definition.

## Syntax
<a name="aws-properties-ecs-taskdefinition-ulimit-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-ulimit-syntax.json"></a>

```
{
  "[HardLimit](#cfn-ecs-taskdefinition-ulimit-hardlimit)" : Integer,
  "[Name](#cfn-ecs-taskdefinition-ulimit-name)" : String,
  "[SoftLimit](#cfn-ecs-taskdefinition-ulimit-softlimit)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-ulimit-syntax.yaml"></a>

```
  [HardLimit](#cfn-ecs-taskdefinition-ulimit-hardlimit): Integer
  [Name](#cfn-ecs-taskdefinition-ulimit-name): String
  [SoftLimit](#cfn-ecs-taskdefinition-ulimit-softlimit): Integer
```

## Properties
<a name="aws-properties-ecs-taskdefinition-ulimit-properties"></a>

`HardLimit`  <a name="cfn-ecs-taskdefinition-ulimit-hardlimit"></a>
The hard limit for the `ulimit` type. The value can be specified in bytes, seconds, or as a count, depending on the `type` of the `ulimit`.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-ecs-taskdefinition-ulimit-name"></a>
The `type` of the `ulimit`.  
*Required*: Yes  
*Type*: String  
*Allowed values*: `core | cpu | data | fsize | locks | memlock | msgqueue | nice | nofile | nproc | rss | rtprio | rttime | sigpending | stack`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SoftLimit`  <a name="cfn-ecs-taskdefinition-ulimit-softlimit"></a>
The soft limit for the `ulimit` type. The value can be specified in bytes, seconds, or as a count, depending on the `type` of the `ulimit`.  
*Required*: Yes  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition Volume
<a name="aws-properties-ecs-taskdefinition-volume"></a>

The data volume configuration for tasks launched using this task definition. Specifying a volume configuration in a task definition is optional. The volume configuration may contain multiple volumes but only one volume configured at launch is supported. Each volume defined in the volume configuration may only specify a `name` and one of either `configuredAtLaunch`, `dockerVolumeConfiguration`, `efsVolumeConfiguration`, `fsxWindowsFileServerVolumeConfiguration`, or `host`. If an empty volume configuration is specified, by default Amazon ECS uses a host volume. For more information, see [Using data volumes in tasks](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using_data_volumes.html).

## Syntax
<a name="aws-properties-ecs-taskdefinition-volume-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-volume-syntax.json"></a>

```
{
  "[ConfiguredAtLaunch](#cfn-ecs-taskdefinition-volume-configuredatlaunch)" : Boolean,
  "[DockerVolumeConfiguration](#cfn-ecs-taskdefinition-volume-dockervolumeconfiguration)" : DockerVolumeConfiguration,
  "[EFSVolumeConfiguration](#cfn-ecs-taskdefinition-volume-efsvolumeconfiguration)" : EFSVolumeConfiguration,
  "[FSxWindowsFileServerVolumeConfiguration](#cfn-ecs-taskdefinition-volume-fsxwindowsfileservervolumeconfiguration)" : FSxWindowsFileServerVolumeConfiguration,
  "[Host](#cfn-ecs-taskdefinition-volume-host)" : HostVolumeProperties,
  "[Name](#cfn-ecs-taskdefinition-volume-name)" : String,
  "[S3FilesVolumeConfiguration](#cfn-ecs-taskdefinition-volume-s3filesvolumeconfiguration)" : S3FilesVolumeConfiguration
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-volume-syntax.yaml"></a>

```
  [ConfiguredAtLaunch](#cfn-ecs-taskdefinition-volume-configuredatlaunch): Boolean
  [DockerVolumeConfiguration](#cfn-ecs-taskdefinition-volume-dockervolumeconfiguration): 
    DockerVolumeConfiguration
  [EFSVolumeConfiguration](#cfn-ecs-taskdefinition-volume-efsvolumeconfiguration): 
    EFSVolumeConfiguration
  [FSxWindowsFileServerVolumeConfiguration](#cfn-ecs-taskdefinition-volume-fsxwindowsfileservervolumeconfiguration): 
    FSxWindowsFileServerVolumeConfiguration
  [Host](#cfn-ecs-taskdefinition-volume-host): 
    HostVolumeProperties
  [Name](#cfn-ecs-taskdefinition-volume-name): String
  [S3FilesVolumeConfiguration](#cfn-ecs-taskdefinition-volume-s3filesvolumeconfiguration): 
    S3FilesVolumeConfiguration
```

## Properties
<a name="aws-properties-ecs-taskdefinition-volume-properties"></a>

`ConfiguredAtLaunch`  <a name="cfn-ecs-taskdefinition-volume-configuredatlaunch"></a>
Indicates whether the volume should be configured at launch time. This is used to create Amazon EBS volumes for standalone tasks or tasks created as part of a service. Each task definition revision may only have one volume configured at launch in the volume configuration.  
To configure a volume at launch time, use this task definition revision and specify a `volumeConfigurations` object when calling the `CreateService`, `UpdateService`, `RunTask` or `StartTask` APIs.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`DockerVolumeConfiguration`  <a name="cfn-ecs-taskdefinition-volume-dockervolumeconfiguration"></a>
This parameter is specified when you use Docker volumes.  
Windows containers only support the use of the `local` driver. To use bind mounts, specify the `host` parameter instead.  
Docker volumes aren't supported by tasks run on AWS Fargate.
*Required*: No  
*Type*: [DockerVolumeConfiguration](aws-properties-ecs-taskdefinition-dockervolumeconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`EFSVolumeConfiguration`  <a name="cfn-ecs-taskdefinition-volume-efsvolumeconfiguration"></a>
This parameter is specified when you use an Amazon Elastic File System file system for task storage.  
*Required*: No  
*Type*: [EFSVolumeConfiguration](aws-properties-ecs-taskdefinition-efsvolumeconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`FSxWindowsFileServerVolumeConfiguration`  <a name="cfn-ecs-taskdefinition-volume-fsxwindowsfileservervolumeconfiguration"></a>
This parameter is specified when you use Amazon FSx for Windows File Server file system for task storage.  
*Required*: No  
*Type*: [FSxWindowsFileServerVolumeConfiguration](aws-properties-ecs-taskdefinition-fsxwindowsfileservervolumeconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Host`  <a name="cfn-ecs-taskdefinition-volume-host"></a>
This parameter is specified when you use bind mount host volumes. The contents of the `host` parameter determine whether your bind mount host volume persists on the host container instance and where it's stored. If the `host` parameter is empty, then the Docker daemon assigns a host path for your data volume. However, the data isn't guaranteed to persist after the containers that are associated with it stop running.  
Windows containers can mount whole directories on the same drive as `$env:ProgramData`. Windows containers can't mount directories on a different drive, and mount point can't be across drives. For example, you can mount `C:\my\path:C:\my\path` and `D:\:D:\`, but not `D:\my\path:C:\my\path` or `D:\:C:\my\path`.  
*Required*: No  
*Type*: [HostVolumeProperties](aws-properties-ecs-taskdefinition-hostvolumeproperties.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Name`  <a name="cfn-ecs-taskdefinition-volume-name"></a>
The name of the volume. Up to 255 letters (uppercase and lowercase), numbers, underscores, and hyphens are allowed.  
When using a volume configured at launch, the `name` is required and must also be specified as the volume name in the `ServiceVolumeConfiguration` or `TaskVolumeConfiguration` parameter when creating your service or standalone task.  
For all other types of volumes, this name is referenced in the `sourceVolume` parameter of the `mountPoints` object in the container definition.  
When a volume is using the `efsVolumeConfiguration`, the name is required.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`S3FilesVolumeConfiguration`  <a name="cfn-ecs-taskdefinition-volume-s3filesvolumeconfiguration"></a>
Property description not available.  
*Required*: No  
*Type*: [S3FilesVolumeConfiguration](aws-properties-ecs-taskdefinition-s3filesvolumeconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskDefinition VolumeFrom
<a name="aws-properties-ecs-taskdefinition-volumefrom"></a>

Details on a data volume from another container in the same task definition.

## Syntax
<a name="aws-properties-ecs-taskdefinition-volumefrom-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskdefinition-volumefrom-syntax.json"></a>

```
{
  "[ReadOnly](#cfn-ecs-taskdefinition-volumefrom-readonly)" : Boolean,
  "[SourceContainer](#cfn-ecs-taskdefinition-volumefrom-sourcecontainer)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskdefinition-volumefrom-syntax.yaml"></a>

```
  [ReadOnly](#cfn-ecs-taskdefinition-volumefrom-readonly): Boolean
  [SourceContainer](#cfn-ecs-taskdefinition-volumefrom-sourcecontainer): String
```

## Properties
<a name="aws-properties-ecs-taskdefinition-volumefrom-properties"></a>

`ReadOnly`  <a name="cfn-ecs-taskdefinition-volumefrom-readonly"></a>
If this value is `true`, the container has read-only access to the volume. If this value is `false`, then the container can write to the volume. The default value is `false`.  
*Required*: No  
*Type*: Boolean  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SourceContainer`  <a name="cfn-ecs-taskdefinition-volumefrom-sourcecontainer"></a>
The name of another container within the same task definition to mount volumes from.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskSet
<a name="aws-resource-ecs-taskset"></a>

Create a task set in the specified cluster and service. This is used when a service uses the `EXTERNAL` deployment controller type. For more information, see [Amazon ECS deployment types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-types.html) in the *Amazon Elastic Container Service Developer Guide*.

**Note**  
On March 21, 2024, a change was made to resolve the task definition revision before authorization. When a task definition revision is not specified, authorization will occur using the latest revision of a task definition.

For information about the maximum number of task sets and other quotas, see [Amazon ECS service quotas](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-quotas.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-resource-ecs-taskset-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-resource-ecs-taskset-syntax.json"></a>

```
{
  "Type" : "AWS::ECS::TaskSet",
  "Properties" : {
      "[CapacityProviderStrategy](#cfn-ecs-taskset-capacityproviderstrategy)" : [ CapacityProviderStrategyItem, ... ],
      "[Cluster](#cfn-ecs-taskset-cluster)" : String,
      "[ExternalId](#cfn-ecs-taskset-externalid)" : String,
      "[LaunchType](#cfn-ecs-taskset-launchtype)" : String,
      "[LoadBalancers](#cfn-ecs-taskset-loadbalancers)" : [ LoadBalancer, ... ],
      "[NetworkConfiguration](#cfn-ecs-taskset-networkconfiguration)" : NetworkConfiguration,
      "[PlatformVersion](#cfn-ecs-taskset-platformversion)" : String,
      "[Scale](#cfn-ecs-taskset-scale)" : Scale,
      "[Service](#cfn-ecs-taskset-service)" : String,
      "[ServiceRegistries](#cfn-ecs-taskset-serviceregistries)" : [ ServiceRegistry, ... ],
      "[Tags](#cfn-ecs-taskset-tags)" : [ Tag, ... ],
      "[TaskDefinition](#cfn-ecs-taskset-taskdefinition)" : String
    }
}
```

### YAML
<a name="aws-resource-ecs-taskset-syntax.yaml"></a>

```
Type: AWS::ECS::TaskSet
Properties:
  [CapacityProviderStrategy](#cfn-ecs-taskset-capacityproviderstrategy): 
    - CapacityProviderStrategyItem
  [Cluster](#cfn-ecs-taskset-cluster): String
  [ExternalId](#cfn-ecs-taskset-externalid): String
  [LaunchType](#cfn-ecs-taskset-launchtype): String
  [LoadBalancers](#cfn-ecs-taskset-loadbalancers): 
    - LoadBalancer
  [NetworkConfiguration](#cfn-ecs-taskset-networkconfiguration): 
    NetworkConfiguration
  [PlatformVersion](#cfn-ecs-taskset-platformversion): String
  [Scale](#cfn-ecs-taskset-scale): 
    Scale
  [Service](#cfn-ecs-taskset-service): String
  [ServiceRegistries](#cfn-ecs-taskset-serviceregistries): 
    - ServiceRegistry
  [Tags](#cfn-ecs-taskset-tags): 
    - Tag
  [TaskDefinition](#cfn-ecs-taskset-taskdefinition): String
```

## Properties
<a name="aws-resource-ecs-taskset-properties"></a>

`CapacityProviderStrategy`  <a name="cfn-ecs-taskset-capacityproviderstrategy"></a>
The capacity provider strategy that are associated with the task set.  
*Required*: No  
*Type*: Array of [CapacityProviderStrategyItem](aws-properties-ecs-taskset-capacityproviderstrategyitem.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Cluster`  <a name="cfn-ecs-taskset-cluster"></a>
The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service to create the task set in.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ExternalId`  <a name="cfn-ecs-taskset-externalid"></a>
An optional non-unique tag that identifies this task set in external systems. If the task set is associated with a service discovery registry, the tasks in this task set will have the `ECS_TASK_SET_EXTERNAL_ID`AWS Cloud Map attribute set to the provided value.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LaunchType`  <a name="cfn-ecs-taskset-launchtype"></a>
The launch type that new tasks in the task set uses. For more information, see [Amazon ECS launch types](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/launch_types.html) in the *Amazon Elastic Container Service Developer Guide*.  
If a `launchType` is specified, the `capacityProviderStrategy` parameter must be omitted.  
*Required*: No  
*Type*: String  
*Allowed values*: `EC2 | FARGATE`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`LoadBalancers`  <a name="cfn-ecs-taskset-loadbalancers"></a>
A load balancer object representing the load balancer to use with the task set. The supported load balancer types are either an Application Load Balancer or a Network Load Balancer.  
*Required*: No  
*Type*: Array of [LoadBalancer](aws-properties-ecs-taskset-loadbalancer.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`NetworkConfiguration`  <a name="cfn-ecs-taskset-networkconfiguration"></a>
The network configuration for the task set.  
*Required*: No  
*Type*: [NetworkConfiguration](aws-properties-ecs-taskset-networkconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`PlatformVersion`  <a name="cfn-ecs-taskset-platformversion"></a>
The platform version that the tasks in the task set uses. A platform version is specified only for tasks using the Fargate launch type. If one isn't specified, the `LATEST` platform version is used.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Scale`  <a name="cfn-ecs-taskset-scale"></a>
A floating-point percentage of your desired number of tasks to place and keep running in the task set.  
*Required*: No  
*Type*: [Scale](aws-properties-ecs-taskset-scale.md)  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Service`  <a name="cfn-ecs-taskset-service"></a>
The short name or full Amazon Resource Name (ARN) of the service to create the task set in.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ServiceRegistries`  <a name="cfn-ecs-taskset-serviceregistries"></a>
The details of the service discovery registries to assign to this task set. For more information, see [Service discovery](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-discovery.html).  
*Required*: No  
*Type*: Array of [ServiceRegistry](aws-properties-ecs-taskset-serviceregistry.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Tags`  <a name="cfn-ecs-taskset-tags"></a>
The metadata that you apply to the task set to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.  
The following basic restrictions apply to tags:  
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.
*Required*: No  
*Type*: Array of [Tag](aws-properties-ecs-taskset-tag.md)  
*Minimum*: `0`  
*Maximum*: `50`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`TaskDefinition`  <a name="cfn-ecs-taskset-taskdefinition"></a>
The task definition for the tasks in the task set to use. If a revision isn't specified, the latest `ACTIVE` revision is used.  
*Required*: Yes  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

## Return values
<a name="aws-resource-ecs-taskset-return-values"></a>

### Ref
<a name="aws-resource-ecs-taskset-return-values-ref"></a>

When you pass the logical ID of this resource to the intrinsic `Ref` function, `Ref` returns the resource name.

For more information about using the `Ref` function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-ref.html).

### Fn::GetAtt
<a name="aws-resource-ecs-taskset-return-values-fn--getatt"></a>

The `Fn::GetAtt` intrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the `Fn::GetAtt` intrinsic function, see [https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/intrinsic-function-reference-getatt.html).

#### 
<a name="aws-resource-ecs-taskset-return-values-fn--getatt-fn--getatt"></a>

`Id`  <a name="Id-fn::getatt"></a>
The ID of the task set.

## Examples
<a name="aws-resource-ecs-taskset--examples"></a>



### Create an Amazon ECS task set
<a name="aws-resource-ecs-taskset--examples--Create_an_task_set"></a>

This template defines a task definition, a cluster, a service, and a task set. The task set uses the specified task definition and is created in the specified cluster and service. Replace the `ExecutionRoleArn`, `SecurityGroups`, and `Subnets` with your own information.

#### JSON
<a name="aws-resource-ecs-taskset--examples--Create_an_task_set--json"></a>

```
{
  "AWSTemplateFormatVersion": "2010-09-09",
  "Resources": {
    "ECSCluster": {
      "Type": "AWS::ECS::Cluster",
      "Properties": {
        "ClusterName": "deployment-cluster"
      }
    },
    "ECSService": {
      "Type": "AWS::ECS::Service",
      "Properties": {
        "ServiceName": "deployment-service",
        "Cluster": {
          "Ref": "ECSCluster"
        },
        "DesiredCount": 2,
        "DeploymentController": {
          "Type": "EXTERNAL"
        }
      }
    },
    "ECSTaskDefinition": {
      "Type": "AWS::ECS::TaskDefinition",
      "Properties": {
        "ContainerDefinitions": [
          {
            "Command": [
             "/bin/sh -c \"echo '<html> <head> <title>Amazon
              ECS Sample App</title> <style>body {margin-top: 40px;
              background-color: #333;} </style> </head><body>
              <div style=color:white;text-align:center> <h1>Amazon
              ECS Sample App</h1> <h2>Congratulations!</h2>
              <p>Your application is now running on a container in Amazon
              ECS.</p> </div></body></html>'
              >  /usr/local/apache2/htdocs/index.html &&
              httpd-foreground\""
            ],
            "EntryPoint": ["sh", "-c"],
            "Essential": true,
            "Image": "public.ecr.aws/docker/library/httpd:2.4",
            "LogConfiguration": {
              "LogDriver": "awslogs",
              "Options": {
                "awslogs-group": "/ecs/deployment",
                "awslogs-region": "us-east-1",
                "awslogs-stream-prefix": "ecs"
              }
            },
            "Name": "sample-fargate-app",
            "PortMappings": [
              {
                "ContainerPort": 80,
                "HostPort": 80,
                "Protocol": "tcp"
              }
            ]
          }
        ],
        "Cpu": 256,
        "ExecutionRoleArn": "arn:aws:iam::111122223333:role/ecsTaskExecutionRole",
        "Family": "deployment-task",
        "Memory": 512,
        "NetworkMode": "awsvpc",
        "RequiresCompatibilities": ["FARGATE"],
        "RuntimePlatform": {
          "OperatingSystemFamily": "LINUX"
        }
      }
    },
    "ECSTaskSet": {
      "Type": "AWS::ECS::TaskSet",
      "Properties": {
        "Cluster": {
          "Ref": "ECSCluster"
        },
        "LaunchType": "FARGATE",
        "NetworkConfiguration": {
          "AwsVpcConfiguration": {
            "AssignPublicIp": "ENABLED",
            "SecurityGroups": ["sg-abcdef01234567890"],
            "Subnets": ["subnet-021345abcdef67890"]
          }
        },
        "PlatformVersion": "1.4.0",
        "Scale": {
          "Unit": "PERCENT",
          "Value": 100
        },
        "Service": {
          "Ref": "ECSService"
        },
        "TaskDefinition": {
          "Ref": "ECSTaskDefinition"
        }
      }
    }
  }
}
```

#### YAML
<a name="aws-resource-ecs-taskset--examples--Create_an_task_set--yaml"></a>

```
AWSTemplateFormatVersion: 2010-09-09
Resources:
  ECSCluster:
    Type: AWS::ECS::Cluster
    Properties:
      ClusterName: deployment-cluster
  ECSService:
    Type: AWS::ECS::Service
    Properties:
      ServiceName: deployment-service
      Cluster:
        Ref: ECSCluster
      DesiredCount: 2
      DeploymentController:
        Type: EXTERNAL
  ECSTaskDefinition:
    Type: AWS::ECS::TaskDefinition
    Properties:
      ContainerDefinitions:
        - Command:
            - "/bin/sh -c \"echo '<html> <head> <title>Amazon
              ECS Sample App</title> <style>body {margin-top: 40px;
              background-color: #333;} </style> </head><body>
              <div style=color:white;text-align:center> <h1>Amazon
              ECS Sample App</h1> <h2>Congratulations!</h2>
              <p>Your application is now running on a container in Amazon
              ECS.</p> </div></body></html>'
              >  /usr/local/apache2/htdocs/index.html &&
              httpd-foreground\""
          EntryPoint:
            - sh
            - -c
          Essential: true
          Image: 'public.ecr.aws/docker/library/httpd:2.4'
          LogConfiguration:
            LogDriver: awslogs
            Options:
              awslogs-group: /ecs/deployment
              awslogs-region: us-east-1
              awslogs-stream-prefix: ecs
          Name: sample-fargate-app
          PortMappings:
            - ContainerPort: 80
              HostPort: 80
              Protocol: tcp
      Cpu: 256
      ExecutionRoleArn: arn:aws:iam::111122223333:role/ecsTaskExecutionRole
      Family: deployment-task
      Memory: 512
      NetworkMode: awsvpc
      RequiresCompatibilities:
        - FARGATE
      RuntimePlatform:
        OperatingSystemFamily: LINUX
  ECSTaskSet:
    Type: AWS::ECS::TaskSet
    Properties:
      Cluster:
        Ref: ECSCluster
      LaunchType: FARGATE
      NetworkConfiguration:
        AwsVpcConfiguration:
          AssignPublicIp: ENABLED
          SecurityGroups:
            - sg-abcdef01234567890
          Subnets:
            - subnet-abcdef01234567890
      PlatformVersion: 1.4.0
      Scale:
        Unit: PERCENT
        Value: 50
      Service:
        Ref: ECSService
      TaskDefinition:
        Ref: ECSTaskDefinition
```

# AWS::ECS::TaskSet AwsVpcConfiguration
<a name="aws-properties-ecs-taskset-awsvpcconfiguration"></a>

An object representing the networking details for a task or service. For example `awsVpcConfiguration={subnets=["subnet-12344321"],securityGroups=["sg-12344321"]}`.

## Syntax
<a name="aws-properties-ecs-taskset-awsvpcconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskset-awsvpcconfiguration-syntax.json"></a>

```
{
  "[AssignPublicIp](#cfn-ecs-taskset-awsvpcconfiguration-assignpublicip)" : String,
  "[SecurityGroups](#cfn-ecs-taskset-awsvpcconfiguration-securitygroups)" : [ String, ... ],
  "[Subnets](#cfn-ecs-taskset-awsvpcconfiguration-subnets)" : [ String, ... ]
}
```

### YAML
<a name="aws-properties-ecs-taskset-awsvpcconfiguration-syntax.yaml"></a>

```
  [AssignPublicIp](#cfn-ecs-taskset-awsvpcconfiguration-assignpublicip): String
  [SecurityGroups](#cfn-ecs-taskset-awsvpcconfiguration-securitygroups): 
    - String
  [Subnets](#cfn-ecs-taskset-awsvpcconfiguration-subnets): 
    - String
```

## Properties
<a name="aws-properties-ecs-taskset-awsvpcconfiguration-properties"></a>

`AssignPublicIp`  <a name="cfn-ecs-taskset-awsvpcconfiguration-assignpublicip"></a>
Whether the task's elastic network interface receives a public IP address.   
Consider the following when you set this value:  
+ When you use `create-service` or `update-service`, the default is `DISABLED`. 
+ When the service `deploymentController` is `ECS`, the value must be `DISABLED`. 
*Required*: No  
*Type*: String  
*Allowed values*: `DISABLED | ENABLED`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`SecurityGroups`  <a name="cfn-ecs-taskset-awsvpcconfiguration-securitygroups"></a>
The IDs of the security groups associated with the task or service. If you don't specify a security group, the default security group for the VPC is used. There's a limit of 5 security groups that can be specified.  
All specified security groups must be from the same VPC.
*Required*: No  
*Type*: Array of String  
*Maximum*: `5`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Subnets`  <a name="cfn-ecs-taskset-awsvpcconfiguration-subnets"></a>
The IDs of the subnets associated with the task or service. There's a limit of 16 subnets that can be specified.  
All specified subnets must be from the same VPC.
*Required*: Yes  
*Type*: Array of String  
*Maximum*: `16`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskSet CapacityProviderStrategyItem
<a name="aws-properties-ecs-taskset-capacityproviderstrategyitem"></a>

The details of a capacity provider strategy. A capacity provider strategy can be set when using the [RunTask](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_RunTask.html)or [CreateCluster](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateCluster.html) APIs or as the default capacity provider strategy for a cluster with the `CreateCluster` API.

Only capacity providers that are already associated with a cluster and have an `ACTIVE` or `UPDATING` status can be used in a capacity provider strategy. The [PutClusterCapacityProviders](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_PutClusterCapacityProviders.html) API is used to associate a capacity provider with a cluster.

If specifying a capacity provider that uses an Auto Scaling group, the capacity provider must already be created. New Auto Scaling group capacity providers can be created with the [CreateClusterCapacityProvider](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateClusterCapacityProvider.html) API operation.

To use a AWS Fargate capacity provider, specify either the `FARGATE` or `FARGATE_SPOT` capacity providers. The AWS Fargate capacity providers are available to all accounts and only need to be associated with a cluster to be used in a capacity provider strategy.

With `FARGATE_SPOT`, you can run interruption tolerant tasks at a rate that's discounted compared to the `FARGATE` price. `FARGATE_SPOT` runs tasks on spare compute capacity. When AWS needs the capacity back, your tasks are interrupted with a two-minute warning. `FARGATE_SPOT` supports Linux tasks with the X86\$164 architecture on platform version 1.3.0 or later. `FARGATE_SPOT` supports Linux tasks with the ARM64 architecture on platform version 1.4.0 or later.

A capacity provider strategy can contain a maximum of 20 capacity providers.

## Syntax
<a name="aws-properties-ecs-taskset-capacityproviderstrategyitem-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskset-capacityproviderstrategyitem-syntax.json"></a>

```
{
  "[Base](#cfn-ecs-taskset-capacityproviderstrategyitem-base)" : Integer,
  "[CapacityProvider](#cfn-ecs-taskset-capacityproviderstrategyitem-capacityprovider)" : String,
  "[Weight](#cfn-ecs-taskset-capacityproviderstrategyitem-weight)" : Integer
}
```

### YAML
<a name="aws-properties-ecs-taskset-capacityproviderstrategyitem-syntax.yaml"></a>

```
  [Base](#cfn-ecs-taskset-capacityproviderstrategyitem-base): Integer
  [CapacityProvider](#cfn-ecs-taskset-capacityproviderstrategyitem-capacityprovider): String
  [Weight](#cfn-ecs-taskset-capacityproviderstrategyitem-weight): Integer
```

## Properties
<a name="aws-properties-ecs-taskset-capacityproviderstrategyitem-properties"></a>

`Base`  <a name="cfn-ecs-taskset-capacityproviderstrategyitem-base"></a>
The *base* value designates how many tasks, at a minimum, to run on the specified capacity provider for each service. Only one capacity provider in a capacity provider strategy can have a *base* defined. If no value is specified, the default value of `0` is used.  
Base value characteristics:  
+ Only one capacity provider in a strategy can have a base defined
+ The default value is `0` if not specified
+ The valid range is 0 to 100,000
+ Base requirements are satisfied first before weight distribution
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `100000`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`CapacityProvider`  <a name="cfn-ecs-taskset-capacityproviderstrategyitem-capacityprovider"></a>
The short name of the capacity provider. This can be either an AWS managed capacity provider (`FARGATE` or `FARGATE_SPOT`) or the name of a custom capacity provider that you created.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Weight`  <a name="cfn-ecs-taskset-capacityproviderstrategyitem-weight"></a>
The *weight* value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The `weight` value is taken into consideration after the `base` value, if defined, is satisfied.  
If no `weight` value is specified, the default value of `0` is used. When multiple capacity providers are specified within a capacity provider strategy, at least one of the capacity providers must have a weight value greater than zero and any capacity providers with a weight of `0` can't be used to place tasks. If you specify multiple capacity providers in a strategy that all have a weight of `0`, any `RunTask` or `CreateService` actions using the capacity provider strategy will fail.  
Weight value characteristics:  
+ Weight is considered after the base value is satisfied
+ The default value is `0` if not specified
+ The valid range is 0 to 1,000
+ At least one capacity provider must have a weight greater than zero
+ Capacity providers with weight of `0` cannot place tasks
Task distribution logic:  

1. Base satisfaction: The minimum number of tasks specified by the base value are placed on that capacity provider

1. Weight distribution: After base requirements are met, additional tasks are distributed according to weight ratios
Examples:  
Equal Distribution: Two capacity providers both with weight `1` will split tasks evenly after base requirements are met.  
Weighted Distribution: If capacityProviderA has weight `1` and capacityProviderB has weight `4`, then for every 1 task on A, 4 tasks will run on B.  
*Required*: No  
*Type*: Integer  
*Minimum*: `0`  
*Maximum*: `1000`  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskSet LoadBalancer
<a name="aws-properties-ecs-taskset-loadbalancer"></a>

The load balancer configuration to use with a service or task set.

When you add, update, or remove a load balancer configuration, Amazon ECS starts a new deployment with the updated Elastic Load Balancing configuration. This causes tasks to register to and deregister from load balancers.

We recommend that you verify this on a test environment before you update the Elastic Load Balancing configuration. 

A service-linked role is required for services that use multiple target groups. For more information, see [Using service-linked roles](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/using-service-linked-roles.html) in the *Amazon Elastic Container Service Developer Guide*.

## Syntax
<a name="aws-properties-ecs-taskset-loadbalancer-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskset-loadbalancer-syntax.json"></a>

```
{
  "[ContainerName](#cfn-ecs-taskset-loadbalancer-containername)" : String,
  "[ContainerPort](#cfn-ecs-taskset-loadbalancer-containerport)" : Integer,
  "[TargetGroupArn](#cfn-ecs-taskset-loadbalancer-targetgrouparn)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskset-loadbalancer-syntax.yaml"></a>

```
  [ContainerName](#cfn-ecs-taskset-loadbalancer-containername): String
  [ContainerPort](#cfn-ecs-taskset-loadbalancer-containerport): Integer
  [TargetGroupArn](#cfn-ecs-taskset-loadbalancer-targetgrouparn): String
```

## Properties
<a name="aws-properties-ecs-taskset-loadbalancer-properties"></a>

`ContainerName`  <a name="cfn-ecs-taskset-loadbalancer-containername"></a>
The name of the container (as it appears in a container definition) to associate with the load balancer.  
You need to specify the container name when configuring the target group for an Amazon ECS load balancer.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ContainerPort`  <a name="cfn-ecs-taskset-loadbalancer-containerport"></a>
The port on the container to associate with the load balancer. This port must correspond to a `containerPort` in the task definition the tasks in the service are using. For tasks that use the EC2 launch type, the container instance they're launched on must allow ingress traffic on the `hostPort` of the port mapping.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`TargetGroupArn`  <a name="cfn-ecs-taskset-loadbalancer-targetgrouparn"></a>
The full Amazon Resource Name (ARN) of the Elastic Load Balancing target group or groups associated with a service or task set.  
A target group ARN is only specified when using an Application Load Balancer or Network Load Balancer.   
For services using the `ECS` deployment controller, you can specify one or multiple target groups. For more information, see [Registering multiple target groups with a service](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html) in the *Amazon Elastic Container Service Developer Guide*.  
For services using the `CODE_DEPLOY` deployment controller, you're required to define two target groups for the load balancer. For more information, see [Blue/green deployment with CodeDeploy](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-bluegreen.html) in the *Amazon Elastic Container Service Developer Guide*.  
If your service's task definition uses the `awsvpc` network mode, you must choose `ip` as the target type, not `instance`. Do this when creating your target groups because tasks that use the `awsvpc` network mode are associated with an elastic network interface, not an Amazon EC2 instance. This network mode is required for the Fargate launch type.
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskSet NetworkConfiguration
<a name="aws-properties-ecs-taskset-networkconfiguration"></a>

The network configuration for a task or service.

## Syntax
<a name="aws-properties-ecs-taskset-networkconfiguration-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskset-networkconfiguration-syntax.json"></a>

```
{
  "[AwsVpcConfiguration](#cfn-ecs-taskset-networkconfiguration-awsvpcconfiguration)" : AwsVpcConfiguration
}
```

### YAML
<a name="aws-properties-ecs-taskset-networkconfiguration-syntax.yaml"></a>

```
  [AwsVpcConfiguration](#cfn-ecs-taskset-networkconfiguration-awsvpcconfiguration): 
    AwsVpcConfiguration
```

## Properties
<a name="aws-properties-ecs-taskset-networkconfiguration-properties"></a>

`AwsVpcConfiguration`  <a name="cfn-ecs-taskset-networkconfiguration-awsvpcconfiguration"></a>
The VPC subnets and security groups that are associated with a task.  
All specified subnets and security groups must be from the same VPC.
*Required*: No  
*Type*: [AwsVpcConfiguration](aws-properties-ecs-taskset-awsvpcconfiguration.md)  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskSet Scale
<a name="aws-properties-ecs-taskset-scale"></a>

A floating-point percentage of the desired number of tasks to place and keep running in the task set.

## Syntax
<a name="aws-properties-ecs-taskset-scale-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskset-scale-syntax.json"></a>

```
{
  "[Unit](#cfn-ecs-taskset-scale-unit)" : String,
  "[Value](#cfn-ecs-taskset-scale-value)" : Number
}
```

### YAML
<a name="aws-properties-ecs-taskset-scale-syntax.yaml"></a>

```
  [Unit](#cfn-ecs-taskset-scale-unit): String
  [Value](#cfn-ecs-taskset-scale-value): Number
```

## Properties
<a name="aws-properties-ecs-taskset-scale-properties"></a>

`Unit`  <a name="cfn-ecs-taskset-scale-unit"></a>
The unit of measure for the scale value.  
*Required*: No  
*Type*: String  
*Allowed values*: `PERCENT`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ecs-taskset-scale-value"></a>
The value, specified as a percent total of a service's `desiredCount`, to scale the task set. Accepted values are numbers between 0 and 100.  
*Required*: No  
*Type*: Number  
*Minimum*: `0`  
*Maximum*: `100`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

# AWS::ECS::TaskSet ServiceRegistry
<a name="aws-properties-ecs-taskset-serviceregistry"></a>

The details for the service registry.

Each service may be associated with one service registry. Multiple service registries for each service are not supported.

When you add, update, or remove the service registries configuration, Amazon ECS starts a new deployment. New tasks are registered and deregistered to the updated service registry configuration.

## Syntax
<a name="aws-properties-ecs-taskset-serviceregistry-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskset-serviceregistry-syntax.json"></a>

```
{
  "[ContainerName](#cfn-ecs-taskset-serviceregistry-containername)" : String,
  "[ContainerPort](#cfn-ecs-taskset-serviceregistry-containerport)" : Integer,
  "[Port](#cfn-ecs-taskset-serviceregistry-port)" : Integer,
  "[RegistryArn](#cfn-ecs-taskset-serviceregistry-registryarn)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskset-serviceregistry-syntax.yaml"></a>

```
  [ContainerName](#cfn-ecs-taskset-serviceregistry-containername): String
  [ContainerPort](#cfn-ecs-taskset-serviceregistry-containerport): Integer
  [Port](#cfn-ecs-taskset-serviceregistry-port): Integer
  [RegistryArn](#cfn-ecs-taskset-serviceregistry-registryarn): String
```

## Properties
<a name="aws-properties-ecs-taskset-serviceregistry-properties"></a>

`ContainerName`  <a name="cfn-ecs-taskset-serviceregistry-containername"></a>
The container name value to be used for your service discovery service. It's already specified in the task definition. If the task definition that your service task specifies uses the `bridge` or `host` network mode, you must specify a `containerName` and `containerPort` combination from the task definition. If the task definition that your service task specifies uses the `awsvpc` network mode and a type SRV DNS record is used, you must specify either a `containerName` and `containerPort` combination or a `port` value. However, you can't specify both.  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`ContainerPort`  <a name="cfn-ecs-taskset-serviceregistry-containerport"></a>
The port value to be used for your service discovery service. It's already specified in the task definition. If the task definition your service task specifies uses the `bridge` or `host` network mode, you must specify a `containerName` and `containerPort` combination from the task definition. If the task definition your service task specifies uses the `awsvpc` network mode and a type SRV DNS record is used, you must specify either a `containerName` and `containerPort` combination or a `port` value. However, you can't specify both.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`Port`  <a name="cfn-ecs-taskset-serviceregistry-port"></a>
The port value used if your service discovery service specified an SRV record. This field might be used if both the `awsvpc` network mode and SRV records are used.  
*Required*: No  
*Type*: Integer  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

`RegistryArn`  <a name="cfn-ecs-taskset-serviceregistry-registryarn"></a>
The Amazon Resource Name (ARN) of the service registry. The currently supported service registry is AWS Cloud Map. For more information, see [CreateService](https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html).  
*Required*: No  
*Type*: String  
*Update requires*: [Replacement](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-replacement)

# AWS::ECS::TaskSet Tag
<a name="aws-properties-ecs-taskset-tag"></a>

The metadata that you apply to a resource to help you categorize and organize them. Each tag consists of a key and an optional value. You define them.

The following basic restrictions apply to tags:
+ Maximum number of tags per resource - 50
+ For each resource, each tag key must be unique, and each tag key can have only one value.
+ Maximum key length - 128 Unicode characters in UTF-8
+ Maximum value length - 256 Unicode characters in UTF-8
+ If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: \$1 - = . \$1 : / @.
+ Tag keys and values are case-sensitive.
+ Do not use `aws:`, `AWS:`, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for AWS use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.

## Syntax
<a name="aws-properties-ecs-taskset-tag-syntax"></a>

To declare this entity in your CloudFormation template, use the following syntax:

### JSON
<a name="aws-properties-ecs-taskset-tag-syntax.json"></a>

```
{
  "[Key](#cfn-ecs-taskset-tag-key)" : String,
  "[Value](#cfn-ecs-taskset-tag-value)" : String
}
```

### YAML
<a name="aws-properties-ecs-taskset-tag-syntax.yaml"></a>

```
  [Key](#cfn-ecs-taskset-tag-key): String
  [Value](#cfn-ecs-taskset-tag-value): String
```

## Properties
<a name="aws-properties-ecs-taskset-tag-properties"></a>

`Key`  <a name="cfn-ecs-taskset-tag-key"></a>
One part of a key-value pair that make up a tag. A `key` is a general label that acts like a category for more specific tag values.  
*Required*: No  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `1`  
*Maximum*: `128`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)

`Value`  <a name="cfn-ecs-taskset-tag-value"></a>
The optional part of a key-value pair that make up a tag. A `value` acts as a descriptor within a tag category (key).  
*Required*: No  
*Type*: String  
*Pattern*: `([\p{L}\p{Z}\p{N}_.:/=+\-@]*)`  
*Minimum*: `0`  
*Maximum*: `256`  
*Update requires*: [No interruption](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-update-behaviors.html#update-no-interrupt)