AWS::ECS::TaskDefinitionRegisters 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. W...
18 configurable properties. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
ContainerDefinitions | Array<ContainerDefinition> | Create-only |
Cpu | string | Create-only |
EnableFaultInjection | boolean | Create-only |
EphemeralStorage | EphemeralStorage | Create-only |
ExecutionRoleArn | string | Create-only |
Family | string | Create-only |
InferenceAccelerators | Array<InferenceAccelerator> | Create-onlyDeprecated |
IpcMode | string | Create-only |
Memory | string | Create-only |
NetworkMode | string | Create-only |
PidMode | string | Create-only |
PlacementConstraints | Array<TaskDefinitionPlacementConstraint> | Create-only |
ProxyConfiguration | ProxyConfiguration | Create-only |
RequiresCompatibilities | Array<string> | Create-only |
RuntimePlatform | RuntimePlatform | Create-only |
Tags | Array<Tag> | |
TaskRoleArn | string | Create-only |
Volumes | Array<Volume> | Create-only |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
TaskDefinitionArn | string | - |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::ECS::TaskDefinition
Resources:
MyResource:
Type: AWS::ECS::TaskDefinition
Properties:
Tags:
- Key: Environment
Value: ProductionPermissions CloudFormation needs in your IAM role to manage this resource.
ecs:DescribeTaskDefinitionecs:RegisterTaskDefinitionecs:DescribeTaskDefinitionecs:TagResourceiam:GetRoleiam:PassRoleecs:TagResourceecs:UntagResourceecs:ListTagsForResourceecs:DescribeTaskDefinitioniam:GetRoleiam:PassRoleecs:ListTaskDefinitionsecs:DescribeTaskDefinitionecs:DeregisterTaskDefinitionecs:DescribeTaskDefinitioniam:GetRoleiam:PassRoleEverything you need to know about ECS on one page. HD quality, print-friendly.
Download Free InfographicTaskDefinitionArnThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
FamilyContainerDefinitionsCpuEnableFaultInjectionExecutionRoleArnInferenceAcceleratorsMemoryNetworkModePlacementConstraintsProxyConfigurationRequiresCompatibilitiesRuntimePlatformTaskRoleArnVolumesPidModeIpcModeEphemeralStorage