AWS::ECS::ServiceThe 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. The stack update fails if you change any properties that require replacement and at least one 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...
26 configurable properties. Click a row to see details.
| Property | Type | Flags |
|---|---|---|
AvailabilityZoneRebalancing | string | |
CapacityProviderStrategy | Array<CapacityProviderStrategyItem> | |
Cluster | string | Create-only |
DeploymentConfiguration | DeploymentConfiguration | |
DeploymentController | DeploymentController | |
DesiredCount | integer | |
EnableECSManagedTags | boolean | |
EnableExecuteCommand | boolean | |
ForceNewDeployment | ForceNewDeployment | Write-only |
HealthCheckGracePeriodSeconds | integer | |
LaunchType | string | |
LoadBalancers | Array<LoadBalancer> | |
NetworkConfiguration | NetworkConfiguration | |
PlacementConstraints | Array<PlacementConstraint> | |
PlacementStrategies | Array<PlacementStrategy> | |
PlatformVersion | string | |
PropagateTags | string | |
Role | string | Create-only |
SchedulingStrategy | string | Create-only |
ServiceConnectConfiguration | ServiceConnectConfiguration | Write-only |
ServiceName | string | Create-only |
ServiceRegistries | Array<ServiceRegistry> | |
Tags | Array<Tag> | |
TaskDefinition | string | |
VolumeConfigurations | Array<ServiceVolumeConfiguration> | Write-only |
VpcLatticeConfigurations | Array<VpcLatticeConfiguration> |
Values returned after the resource is created. Access these with Fn::GetAtt.
| Attribute | Type | Description |
|---|---|---|
Name | string | - |
ServiceArn | string | - |
A minimal template with required properties and common optional ones.
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::ECS::Service
Resources:
MyResource:
Type: AWS::ECS::Service
Properties:
Tags:
- Key: Environment
Value: ProductionPermissions CloudFormation needs in your IAM role to manage this resource.
ecs:DescribeServicesecs:CreateServiceecs:DescribeServiceDeploymentsecs:DescribeServicesecs:ListServiceDeploymentsiam:PassRoleecs:TagResourceecs:DescribeServiceDeploymentsecs:DescribeServicesecs:ListServiceDeploymentsecs:ListTagsForResourceecs:StopServiceDeploymentecs:TagResourceecs:UntagResourceecs:UpdateServiceecs:DescribeServicesecs:ListClustersecs:ListServicesecs:DeleteServiceecs:DescribeServicesEverything you need to know about ECS on one page. HD quality, print-friendly.
Download Free InfographicServiceArnThese properties cannot be changed after the resource is created. Updating them triggers a replacement.
ClusterRoleSchedulingStrategyServiceName