1. Packages
  2. AWS Classic
  3. API Docs
  4. ecs
  5. Service

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi

aws.ecs.Service

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi

    Note: To prevent a race condition during service deletion, make sure to set depends_on to the related aws.iam.RolePolicy; otherwise, the policy may be destroyed too soon and the ECS service will then get stuck in the DRAINING state.

    Provides an ECS service - effectively a task that is expected to run until an error occurs or a user terminates it (typically a webserver or a database).

    See ECS Services section in AWS developer guide.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var mongo = new Aws.Ecs.Service("mongo", new()
        {
            Cluster = aws_ecs_cluster.Foo.Id,
            TaskDefinition = aws_ecs_task_definition.Mongo.Arn,
            DesiredCount = 3,
            IamRole = aws_iam_role.Foo.Arn,
            OrderedPlacementStrategies = new[]
            {
                new Aws.Ecs.Inputs.ServiceOrderedPlacementStrategyArgs
                {
                    Type = "binpack",
                    Field = "cpu",
                },
            },
            LoadBalancers = new[]
            {
                new Aws.Ecs.Inputs.ServiceLoadBalancerArgs
                {
                    TargetGroupArn = aws_lb_target_group.Foo.Arn,
                    ContainerName = "mongo",
                    ContainerPort = 8080,
                },
            },
            PlacementConstraints = new[]
            {
                new Aws.Ecs.Inputs.ServicePlacementConstraintArgs
                {
                    Type = "memberOf",
                    Expression = "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
                },
            },
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                aws_iam_role_policy.Foo,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecs.NewService(ctx, "mongo", &ecs.ServiceArgs{
    			Cluster:        pulumi.Any(aws_ecs_cluster.Foo.Id),
    			TaskDefinition: pulumi.Any(aws_ecs_task_definition.Mongo.Arn),
    			DesiredCount:   pulumi.Int(3),
    			IamRole:        pulumi.Any(aws_iam_role.Foo.Arn),
    			OrderedPlacementStrategies: ecs.ServiceOrderedPlacementStrategyArray{
    				&ecs.ServiceOrderedPlacementStrategyArgs{
    					Type:  pulumi.String("binpack"),
    					Field: pulumi.String("cpu"),
    				},
    			},
    			LoadBalancers: ecs.ServiceLoadBalancerArray{
    				&ecs.ServiceLoadBalancerArgs{
    					TargetGroupArn: pulumi.Any(aws_lb_target_group.Foo.Arn),
    					ContainerName:  pulumi.String("mongo"),
    					ContainerPort:  pulumi.Int(8080),
    				},
    			},
    			PlacementConstraints: ecs.ServicePlacementConstraintArray{
    				&ecs.ServicePlacementConstraintArgs{
    					Type:       pulumi.String("memberOf"),
    					Expression: pulumi.String("attribute:ecs.availability-zone in [us-west-2a, us-west-2b]"),
    				},
    			},
    		}, pulumi.DependsOn([]pulumi.Resource{
    			aws_iam_role_policy.Foo,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ecs.Service;
    import com.pulumi.aws.ecs.ServiceArgs;
    import com.pulumi.aws.ecs.inputs.ServiceOrderedPlacementStrategyArgs;
    import com.pulumi.aws.ecs.inputs.ServiceLoadBalancerArgs;
    import com.pulumi.aws.ecs.inputs.ServicePlacementConstraintArgs;
    import com.pulumi.resources.CustomResourceOptions;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var mongo = new Service("mongo", ServiceArgs.builder()        
                .cluster(aws_ecs_cluster.foo().id())
                .taskDefinition(aws_ecs_task_definition.mongo().arn())
                .desiredCount(3)
                .iamRole(aws_iam_role.foo().arn())
                .orderedPlacementStrategies(ServiceOrderedPlacementStrategyArgs.builder()
                    .type("binpack")
                    .field("cpu")
                    .build())
                .loadBalancers(ServiceLoadBalancerArgs.builder()
                    .targetGroupArn(aws_lb_target_group.foo().arn())
                    .containerName("mongo")
                    .containerPort(8080)
                    .build())
                .placementConstraints(ServicePlacementConstraintArgs.builder()
                    .type("memberOf")
                    .expression("attribute:ecs.availability-zone in [us-west-2a, us-west-2b]")
                    .build())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(aws_iam_role_policy.foo())
                    .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    mongo = aws.ecs.Service("mongo",
        cluster=aws_ecs_cluster["foo"]["id"],
        task_definition=aws_ecs_task_definition["mongo"]["arn"],
        desired_count=3,
        iam_role=aws_iam_role["foo"]["arn"],
        ordered_placement_strategies=[aws.ecs.ServiceOrderedPlacementStrategyArgs(
            type="binpack",
            field="cpu",
        )],
        load_balancers=[aws.ecs.ServiceLoadBalancerArgs(
            target_group_arn=aws_lb_target_group["foo"]["arn"],
            container_name="mongo",
            container_port=8080,
        )],
        placement_constraints=[aws.ecs.ServicePlacementConstraintArgs(
            type="memberOf",
            expression="attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
        )],
        opts=pulumi.ResourceOptions(depends_on=[aws_iam_role_policy["foo"]]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const mongo = new aws.ecs.Service("mongo", {
        cluster: aws_ecs_cluster.foo.id,
        taskDefinition: aws_ecs_task_definition.mongo.arn,
        desiredCount: 3,
        iamRole: aws_iam_role.foo.arn,
        orderedPlacementStrategies: [{
            type: "binpack",
            field: "cpu",
        }],
        loadBalancers: [{
            targetGroupArn: aws_lb_target_group.foo.arn,
            containerName: "mongo",
            containerPort: 8080,
        }],
        placementConstraints: [{
            type: "memberOf",
            expression: "attribute:ecs.availability-zone in [us-west-2a, us-west-2b]",
        }],
    }, {
        dependsOn: [aws_iam_role_policy.foo],
    });
    
    resources:
      mongo:
        type: aws:ecs:Service
        properties:
          cluster: ${aws_ecs_cluster.foo.id}
          taskDefinition: ${aws_ecs_task_definition.mongo.arn}
          desiredCount: 3
          iamRole: ${aws_iam_role.foo.arn}
          orderedPlacementStrategies:
            - type: binpack
              field: cpu
          loadBalancers:
            - targetGroupArn: ${aws_lb_target_group.foo.arn}
              containerName: mongo
              containerPort: 8080
          placementConstraints:
            - type: memberOf
              expression: attribute:ecs.availability-zone in [us-west-2a, us-west-2b]
        options:
          dependson:
            - ${aws_iam_role_policy.foo}
    

    Ignoring Changes to Desired Count

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        // ... other configurations ...
        var example = new Aws.Ecs.Service("example", new()
        {
            DesiredCount = 2,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
    			DesiredCount: pulumi.Int(2),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ecs.Service;
    import com.pulumi.aws.ecs.ServiceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Service("example", ServiceArgs.builder()        
                .desiredCount(2)
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    # ... other configurations ...
    example = aws.ecs.Service("example", desired_count=2)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    // ... other configurations ...
    const example = new aws.ecs.Service("example", {desiredCount: 2});
    
    resources:
      example:
        type: aws:ecs:Service
        properties:
          # Example: Create service with 2 instances to start
          desiredCount: 2
    

    Daemon Scheduling Strategy

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var bar = new Aws.Ecs.Service("bar", new()
        {
            Cluster = aws_ecs_cluster.Foo.Id,
            TaskDefinition = aws_ecs_task_definition.Bar.Arn,
            SchedulingStrategy = "DAEMON",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecs.NewService(ctx, "bar", &ecs.ServiceArgs{
    			Cluster:            pulumi.Any(aws_ecs_cluster.Foo.Id),
    			TaskDefinition:     pulumi.Any(aws_ecs_task_definition.Bar.Arn),
    			SchedulingStrategy: pulumi.String("DAEMON"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ecs.Service;
    import com.pulumi.aws.ecs.ServiceArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var bar = new Service("bar", ServiceArgs.builder()        
                .cluster(aws_ecs_cluster.foo().id())
                .taskDefinition(aws_ecs_task_definition.bar().arn())
                .schedulingStrategy("DAEMON")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    bar = aws.ecs.Service("bar",
        cluster=aws_ecs_cluster["foo"]["id"],
        task_definition=aws_ecs_task_definition["bar"]["arn"],
        scheduling_strategy="DAEMON")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const bar = new aws.ecs.Service("bar", {
        cluster: aws_ecs_cluster.foo.id,
        taskDefinition: aws_ecs_task_definition.bar.arn,
        schedulingStrategy: "DAEMON",
    });
    
    resources:
      bar:
        type: aws:ecs:Service
        properties:
          cluster: ${aws_ecs_cluster.foo.id}
          taskDefinition: ${aws_ecs_task_definition.bar.arn}
          schedulingStrategy: DAEMON
    

    CloudWatch Deployment Alarms

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ecs.Service("example", new()
        {
            Cluster = aws_ecs_cluster.Example.Id,
            Alarms = new Aws.Ecs.Inputs.ServiceAlarmsArgs
            {
                Enable = true,
                Rollback = true,
                AlarmNames = new[]
                {
                    aws_cloudwatch_metric_alarm.Example.Alarm_name,
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
    			Cluster: pulumi.Any(aws_ecs_cluster.Example.Id),
    			Alarms: &ecs.ServiceAlarmsArgs{
    				Enable:   pulumi.Bool(true),
    				Rollback: pulumi.Bool(true),
    				AlarmNames: pulumi.StringArray{
    					aws_cloudwatch_metric_alarm.Example.Alarm_name,
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ecs.Service;
    import com.pulumi.aws.ecs.ServiceArgs;
    import com.pulumi.aws.ecs.inputs.ServiceAlarmsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Service("example", ServiceArgs.builder()        
                .cluster(aws_ecs_cluster.example().id())
                .alarms(ServiceAlarmsArgs.builder()
                    .enable(true)
                    .rollback(true)
                    .alarmNames(aws_cloudwatch_metric_alarm.example().alarm_name())
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ecs.Service("example",
        cluster=aws_ecs_cluster["example"]["id"],
        alarms=aws.ecs.ServiceAlarmsArgs(
            enable=True,
            rollback=True,
            alarm_names=[aws_cloudwatch_metric_alarm["example"]["alarm_name"]],
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ecs.Service("example", {
        cluster: aws_ecs_cluster.example.id,
        alarms: {
            enable: true,
            rollback: true,
            alarmNames: [aws_cloudwatch_metric_alarm.example.alarm_name],
        },
    });
    
    resources:
      example:
        type: aws:ecs:Service
        properties:
          cluster: ${aws_ecs_cluster.example.id}
          alarms:
            enable: true
            rollback: true
            alarmNames:
              - ${aws_cloudwatch_metric_alarm.example.alarm_name}
    

    External Deployment Controller

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Aws.Ecs.Service("example", new()
        {
            Cluster = aws_ecs_cluster.Example.Id,
            DeploymentController = new Aws.Ecs.Inputs.ServiceDeploymentControllerArgs
            {
                Type = "EXTERNAL",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ecs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ecs.NewService(ctx, "example", &ecs.ServiceArgs{
    			Cluster: pulumi.Any(aws_ecs_cluster.Example.Id),
    			DeploymentController: &ecs.ServiceDeploymentControllerArgs{
    				Type: pulumi.String("EXTERNAL"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ecs.Service;
    import com.pulumi.aws.ecs.ServiceArgs;
    import com.pulumi.aws.ecs.inputs.ServiceDeploymentControllerArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Service("example", ServiceArgs.builder()        
                .cluster(aws_ecs_cluster.example().id())
                .deploymentController(ServiceDeploymentControllerArgs.builder()
                    .type("EXTERNAL")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ecs.Service("example",
        cluster=aws_ecs_cluster["example"]["id"],
        deployment_controller=aws.ecs.ServiceDeploymentControllerArgs(
            type="EXTERNAL",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ecs.Service("example", {
        cluster: aws_ecs_cluster.example.id,
        deploymentController: {
            type: "EXTERNAL",
        },
    });
    
    resources:
      example:
        type: aws:ecs:Service
        properties:
          cluster: ${aws_ecs_cluster.example.id}
          deploymentController:
            type: EXTERNAL
    

    Create Service Resource

    new Service(name: string, args?: ServiceArgs, opts?: CustomResourceOptions);
    @overload
    def Service(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                alarms: Optional[ServiceAlarmsArgs] = None,
                capacity_provider_strategies: Optional[Sequence[ServiceCapacityProviderStrategyArgs]] = None,
                cluster: Optional[str] = None,
                deployment_circuit_breaker: Optional[ServiceDeploymentCircuitBreakerArgs] = None,
                deployment_controller: Optional[ServiceDeploymentControllerArgs] = None,
                deployment_maximum_percent: Optional[int] = None,
                deployment_minimum_healthy_percent: Optional[int] = None,
                desired_count: Optional[int] = None,
                enable_ecs_managed_tags: Optional[bool] = None,
                enable_execute_command: Optional[bool] = None,
                force_new_deployment: Optional[bool] = None,
                health_check_grace_period_seconds: Optional[int] = None,
                iam_role: Optional[str] = None,
                launch_type: Optional[str] = None,
                load_balancers: Optional[Sequence[ServiceLoadBalancerArgs]] = None,
                name: Optional[str] = None,
                network_configuration: Optional[ServiceNetworkConfigurationArgs] = None,
                ordered_placement_strategies: Optional[Sequence[ServiceOrderedPlacementStrategyArgs]] = None,
                placement_constraints: Optional[Sequence[ServicePlacementConstraintArgs]] = None,
                platform_version: Optional[str] = None,
                propagate_tags: Optional[str] = None,
                scheduling_strategy: Optional[str] = None,
                service_connect_configuration: Optional[ServiceServiceConnectConfigurationArgs] = None,
                service_registries: Optional[ServiceServiceRegistriesArgs] = None,
                tags: Optional[Mapping[str, str]] = None,
                task_definition: Optional[str] = None,
                triggers: Optional[Mapping[str, str]] = None,
                wait_for_steady_state: Optional[bool] = None)
    @overload
    def Service(resource_name: str,
                args: Optional[ServiceArgs] = None,
                opts: Optional[ResourceOptions] = None)
    func NewService(ctx *Context, name string, args *ServiceArgs, opts ...ResourceOption) (*Service, error)
    public Service(string name, ServiceArgs? args = null, CustomResourceOptions? opts = null)
    public Service(String name, ServiceArgs args)
    public Service(String name, ServiceArgs args, CustomResourceOptions options)
    
    type: aws:ecs:Service
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Service Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Service resource accepts the following input properties:

    Alarms ServiceAlarms

    Information about the CloudWatch alarms. See below.

    CapacityProviderStrategies List<ServiceCapacityProviderStrategy>

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    Cluster string

    ARN of an ECS cluster.

    DeploymentCircuitBreaker ServiceDeploymentCircuitBreaker

    Configuration block for deployment circuit breaker. See below.

    DeploymentController ServiceDeploymentController

    Configuration block for deployment controller configuration. See below.

    DeploymentMaximumPercent int

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    DeploymentMinimumHealthyPercent int

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    DesiredCount int

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    EnableEcsManagedTags bool

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    EnableExecuteCommand bool

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    ForceNewDeployment bool

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    HealthCheckGracePeriodSeconds int

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    IamRole string

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    LaunchType string

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    LoadBalancers List<ServiceLoadBalancer>

    Configuration block for load balancers. See below.

    Name string

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    NetworkConfiguration ServiceNetworkConfiguration

    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. See below.

    OrderedPlacementStrategies List<ServiceOrderedPlacementStrategy>

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    PlacementConstraints List<ServicePlacementConstraint>

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    PlatformVersion string

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    PropagateTags string

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    SchedulingStrategy string

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    ServiceConnectConfiguration ServiceServiceConnectConfiguration

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    ServiceRegistries ServiceServiceRegistries

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    Tags Dictionary<string, string>

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    TaskDefinition string

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    Triggers Dictionary<string, string>

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    WaitForSteadyState bool

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    Alarms ServiceAlarmsArgs

    Information about the CloudWatch alarms. See below.

    CapacityProviderStrategies []ServiceCapacityProviderStrategyArgs

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    Cluster string

    ARN of an ECS cluster.

    DeploymentCircuitBreaker ServiceDeploymentCircuitBreakerArgs

    Configuration block for deployment circuit breaker. See below.

    DeploymentController ServiceDeploymentControllerArgs

    Configuration block for deployment controller configuration. See below.

    DeploymentMaximumPercent int

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    DeploymentMinimumHealthyPercent int

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    DesiredCount int

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    EnableEcsManagedTags bool

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    EnableExecuteCommand bool

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    ForceNewDeployment bool

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    HealthCheckGracePeriodSeconds int

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    IamRole string

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    LaunchType string

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    LoadBalancers []ServiceLoadBalancerArgs

    Configuration block for load balancers. See below.

    Name string

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    NetworkConfiguration ServiceNetworkConfigurationArgs

    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. See below.

    OrderedPlacementStrategies []ServiceOrderedPlacementStrategyArgs

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    PlacementConstraints []ServicePlacementConstraintArgs

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    PlatformVersion string

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    PropagateTags string

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    SchedulingStrategy string

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    ServiceConnectConfiguration ServiceServiceConnectConfigurationArgs

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    ServiceRegistries ServiceServiceRegistriesArgs

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    Tags map[string]string

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    TaskDefinition string

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    Triggers map[string]string

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    WaitForSteadyState bool

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    alarms ServiceAlarms

    Information about the CloudWatch alarms. See below.

    capacityProviderStrategies List<ServiceCapacityProviderStrategy>

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    cluster String

    ARN of an ECS cluster.

    deploymentCircuitBreaker ServiceDeploymentCircuitBreaker

    Configuration block for deployment circuit breaker. See below.

    deploymentController ServiceDeploymentController

    Configuration block for deployment controller configuration. See below.

    deploymentMaximumPercent Integer

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    deploymentMinimumHealthyPercent Integer

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    desiredCount Integer

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    enableEcsManagedTags Boolean

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    enableExecuteCommand Boolean

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    forceNewDeployment Boolean

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    healthCheckGracePeriodSeconds Integer

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    iamRole String

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    launchType String

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    loadBalancers List<ServiceLoadBalancer>

    Configuration block for load balancers. See below.

    name String

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    networkConfiguration ServiceNetworkConfiguration

    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. See below.

    orderedPlacementStrategies List<ServiceOrderedPlacementStrategy>

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    placementConstraints List<ServicePlacementConstraint>

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    platformVersion String

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    propagateTags String

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    schedulingStrategy String

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    serviceConnectConfiguration ServiceServiceConnectConfiguration

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    serviceRegistries ServiceServiceRegistries

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    tags Map<String,String>

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    taskDefinition String

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    triggers Map<String,String>

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    waitForSteadyState Boolean

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    alarms ServiceAlarms

    Information about the CloudWatch alarms. See below.

    capacityProviderStrategies ServiceCapacityProviderStrategy[]

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    cluster string

    ARN of an ECS cluster.

    deploymentCircuitBreaker ServiceDeploymentCircuitBreaker

    Configuration block for deployment circuit breaker. See below.

    deploymentController ServiceDeploymentController

    Configuration block for deployment controller configuration. See below.

    deploymentMaximumPercent number

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    deploymentMinimumHealthyPercent number

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    desiredCount number

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    enableEcsManagedTags boolean

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    enableExecuteCommand boolean

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    forceNewDeployment boolean

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    healthCheckGracePeriodSeconds number

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    iamRole string

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    launchType string

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    loadBalancers ServiceLoadBalancer[]

    Configuration block for load balancers. See below.

    name string

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    networkConfiguration ServiceNetworkConfiguration

    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. See below.

    orderedPlacementStrategies ServiceOrderedPlacementStrategy[]

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    placementConstraints ServicePlacementConstraint[]

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    platformVersion string

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    propagateTags string

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    schedulingStrategy string

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    serviceConnectConfiguration ServiceServiceConnectConfiguration

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    serviceRegistries ServiceServiceRegistries

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    tags {[key: string]: string}

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    taskDefinition string

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    triggers {[key: string]: string}

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    waitForSteadyState boolean

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    alarms ServiceAlarmsArgs

    Information about the CloudWatch alarms. See below.

    capacity_provider_strategies Sequence[ServiceCapacityProviderStrategyArgs]

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    cluster str

    ARN of an ECS cluster.

    deployment_circuit_breaker ServiceDeploymentCircuitBreakerArgs

    Configuration block for deployment circuit breaker. See below.

    deployment_controller ServiceDeploymentControllerArgs

    Configuration block for deployment controller configuration. See below.

    deployment_maximum_percent int

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    deployment_minimum_healthy_percent int

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    desired_count int

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    enable_ecs_managed_tags bool

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    enable_execute_command bool

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    force_new_deployment bool

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    health_check_grace_period_seconds int

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    iam_role str

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    launch_type str

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    load_balancers Sequence[ServiceLoadBalancerArgs]

    Configuration block for load balancers. See below.

    name str

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    network_configuration ServiceNetworkConfigurationArgs

    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. See below.

    ordered_placement_strategies Sequence[ServiceOrderedPlacementStrategyArgs]

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    placement_constraints Sequence[ServicePlacementConstraintArgs]

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    platform_version str

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    propagate_tags str

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    scheduling_strategy str

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    service_connect_configuration ServiceServiceConnectConfigurationArgs

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    service_registries ServiceServiceRegistriesArgs

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    tags Mapping[str, str]

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    task_definition str

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    triggers Mapping[str, str]

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    wait_for_steady_state bool

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    alarms Property Map

    Information about the CloudWatch alarms. See below.

    capacityProviderStrategies List<Property Map>

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    cluster String

    ARN of an ECS cluster.

    deploymentCircuitBreaker Property Map

    Configuration block for deployment circuit breaker. See below.

    deploymentController Property Map

    Configuration block for deployment controller configuration. See below.

    deploymentMaximumPercent Number

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    deploymentMinimumHealthyPercent Number

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    desiredCount Number

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    enableEcsManagedTags Boolean

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    enableExecuteCommand Boolean

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    forceNewDeployment Boolean

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    healthCheckGracePeriodSeconds Number

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    iamRole String

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    launchType String

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    loadBalancers List<Property Map>

    Configuration block for load balancers. See below.

    name String

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    networkConfiguration Property Map

    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. See below.

    orderedPlacementStrategies List<Property Map>

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    placementConstraints List<Property Map>

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    platformVersion String

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    propagateTags String

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    schedulingStrategy String

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    serviceConnectConfiguration Property Map

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    serviceRegistries Property Map

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    tags Map<String>

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    taskDefinition String

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    triggers Map<String>

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    waitForSteadyState Boolean

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Service resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    TagsAll Dictionary<string, string>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    Id string

    The provider-assigned unique ID for this managed resource.

    TagsAll map[string]string

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    id String

    The provider-assigned unique ID for this managed resource.

    tagsAll Map<String,String>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    id string

    The provider-assigned unique ID for this managed resource.

    tagsAll {[key: string]: string}

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    id str

    The provider-assigned unique ID for this managed resource.

    tags_all Mapping[str, str]

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    id String

    The provider-assigned unique ID for this managed resource.

    tagsAll Map<String>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    Look up Existing Service Resource

    Get an existing Service resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ServiceState, opts?: CustomResourceOptions): Service
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alarms: Optional[ServiceAlarmsArgs] = None,
            capacity_provider_strategies: Optional[Sequence[ServiceCapacityProviderStrategyArgs]] = None,
            cluster: Optional[str] = None,
            deployment_circuit_breaker: Optional[ServiceDeploymentCircuitBreakerArgs] = None,
            deployment_controller: Optional[ServiceDeploymentControllerArgs] = None,
            deployment_maximum_percent: Optional[int] = None,
            deployment_minimum_healthy_percent: Optional[int] = None,
            desired_count: Optional[int] = None,
            enable_ecs_managed_tags: Optional[bool] = None,
            enable_execute_command: Optional[bool] = None,
            force_new_deployment: Optional[bool] = None,
            health_check_grace_period_seconds: Optional[int] = None,
            iam_role: Optional[str] = None,
            launch_type: Optional[str] = None,
            load_balancers: Optional[Sequence[ServiceLoadBalancerArgs]] = None,
            name: Optional[str] = None,
            network_configuration: Optional[ServiceNetworkConfigurationArgs] = None,
            ordered_placement_strategies: Optional[Sequence[ServiceOrderedPlacementStrategyArgs]] = None,
            placement_constraints: Optional[Sequence[ServicePlacementConstraintArgs]] = None,
            platform_version: Optional[str] = None,
            propagate_tags: Optional[str] = None,
            scheduling_strategy: Optional[str] = None,
            service_connect_configuration: Optional[ServiceServiceConnectConfigurationArgs] = None,
            service_registries: Optional[ServiceServiceRegistriesArgs] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            task_definition: Optional[str] = None,
            triggers: Optional[Mapping[str, str]] = None,
            wait_for_steady_state: Optional[bool] = None) -> Service
    func GetService(ctx *Context, name string, id IDInput, state *ServiceState, opts ...ResourceOption) (*Service, error)
    public static Service Get(string name, Input<string> id, ServiceState? state, CustomResourceOptions? opts = null)
    public static Service get(String name, Output<String> id, ServiceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Alarms ServiceAlarms

    Information about the CloudWatch alarms. See below.

    CapacityProviderStrategies List<ServiceCapacityProviderStrategy>

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    Cluster string

    ARN of an ECS cluster.

    DeploymentCircuitBreaker ServiceDeploymentCircuitBreaker

    Configuration block for deployment circuit breaker. See below.

    DeploymentController ServiceDeploymentController

    Configuration block for deployment controller configuration. See below.

    DeploymentMaximumPercent int

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    DeploymentMinimumHealthyPercent int

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    DesiredCount int

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    EnableEcsManagedTags bool

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    EnableExecuteCommand bool

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    ForceNewDeployment bool

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    HealthCheckGracePeriodSeconds int

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    IamRole string

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    LaunchType string

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    LoadBalancers List<ServiceLoadBalancer>

    Configuration block for load balancers. See below.

    Name string

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    NetworkConfiguration ServiceNetworkConfiguration

    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. See below.

    OrderedPlacementStrategies List<ServiceOrderedPlacementStrategy>

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    PlacementConstraints List<ServicePlacementConstraint>

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    PlatformVersion string

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    PropagateTags string

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    SchedulingStrategy string

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    ServiceConnectConfiguration ServiceServiceConnectConfiguration

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    ServiceRegistries ServiceServiceRegistries

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    Tags Dictionary<string, string>

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    TagsAll Dictionary<string, string>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    TaskDefinition string

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    Triggers Dictionary<string, string>

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    WaitForSteadyState bool

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    Alarms ServiceAlarmsArgs

    Information about the CloudWatch alarms. See below.

    CapacityProviderStrategies []ServiceCapacityProviderStrategyArgs

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    Cluster string

    ARN of an ECS cluster.

    DeploymentCircuitBreaker ServiceDeploymentCircuitBreakerArgs

    Configuration block for deployment circuit breaker. See below.

    DeploymentController ServiceDeploymentControllerArgs

    Configuration block for deployment controller configuration. See below.

    DeploymentMaximumPercent int

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    DeploymentMinimumHealthyPercent int

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    DesiredCount int

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    EnableEcsManagedTags bool

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    EnableExecuteCommand bool

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    ForceNewDeployment bool

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    HealthCheckGracePeriodSeconds int

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    IamRole string

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    LaunchType string

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    LoadBalancers []ServiceLoadBalancerArgs

    Configuration block for load balancers. See below.

    Name string

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    NetworkConfiguration ServiceNetworkConfigurationArgs

    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. See below.

    OrderedPlacementStrategies []ServiceOrderedPlacementStrategyArgs

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    PlacementConstraints []ServicePlacementConstraintArgs

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    PlatformVersion string

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    PropagateTags string

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    SchedulingStrategy string

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    ServiceConnectConfiguration ServiceServiceConnectConfigurationArgs

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    ServiceRegistries ServiceServiceRegistriesArgs

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    Tags map[string]string

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    TagsAll map[string]string

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    TaskDefinition string

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    Triggers map[string]string

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    WaitForSteadyState bool

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    alarms ServiceAlarms

    Information about the CloudWatch alarms. See below.

    capacityProviderStrategies List<ServiceCapacityProviderStrategy>

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    cluster String

    ARN of an ECS cluster.

    deploymentCircuitBreaker ServiceDeploymentCircuitBreaker

    Configuration block for deployment circuit breaker. See below.

    deploymentController ServiceDeploymentController

    Configuration block for deployment controller configuration. See below.

    deploymentMaximumPercent Integer

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    deploymentMinimumHealthyPercent Integer

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    desiredCount Integer

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    enableEcsManagedTags Boolean

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    enableExecuteCommand Boolean

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    forceNewDeployment Boolean

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    healthCheckGracePeriodSeconds Integer

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    iamRole String

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    launchType String

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    loadBalancers List<ServiceLoadBalancer>

    Configuration block for load balancers. See below.

    name String

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    networkConfiguration ServiceNetworkConfiguration

    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. See below.

    orderedPlacementStrategies List<ServiceOrderedPlacementStrategy>

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    placementConstraints List<ServicePlacementConstraint>

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    platformVersion String

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    propagateTags String

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    schedulingStrategy String

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    serviceConnectConfiguration ServiceServiceConnectConfiguration

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    serviceRegistries ServiceServiceRegistries

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    tags Map<String,String>

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tagsAll Map<String,String>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    taskDefinition String

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    triggers Map<String,String>

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    waitForSteadyState Boolean

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    alarms ServiceAlarms

    Information about the CloudWatch alarms. See below.

    capacityProviderStrategies ServiceCapacityProviderStrategy[]

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    cluster string

    ARN of an ECS cluster.

    deploymentCircuitBreaker ServiceDeploymentCircuitBreaker

    Configuration block for deployment circuit breaker. See below.

    deploymentController ServiceDeploymentController

    Configuration block for deployment controller configuration. See below.

    deploymentMaximumPercent number

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    deploymentMinimumHealthyPercent number

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    desiredCount number

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    enableEcsManagedTags boolean

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    enableExecuteCommand boolean

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    forceNewDeployment boolean

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    healthCheckGracePeriodSeconds number

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    iamRole string

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    launchType string

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    loadBalancers ServiceLoadBalancer[]

    Configuration block for load balancers. See below.

    name string

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    networkConfiguration ServiceNetworkConfiguration

    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. See below.

    orderedPlacementStrategies ServiceOrderedPlacementStrategy[]

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    placementConstraints ServicePlacementConstraint[]

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    platformVersion string

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    propagateTags string

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    schedulingStrategy string

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    serviceConnectConfiguration ServiceServiceConnectConfiguration

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    serviceRegistries ServiceServiceRegistries

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    tags {[key: string]: string}

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tagsAll {[key: string]: string}

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    taskDefinition string

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    triggers {[key: string]: string}

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    waitForSteadyState boolean

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    alarms ServiceAlarmsArgs

    Information about the CloudWatch alarms. See below.

    capacity_provider_strategies Sequence[ServiceCapacityProviderStrategyArgs]

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    cluster str

    ARN of an ECS cluster.

    deployment_circuit_breaker ServiceDeploymentCircuitBreakerArgs

    Configuration block for deployment circuit breaker. See below.

    deployment_controller ServiceDeploymentControllerArgs

    Configuration block for deployment controller configuration. See below.

    deployment_maximum_percent int

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    deployment_minimum_healthy_percent int

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    desired_count int

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    enable_ecs_managed_tags bool

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    enable_execute_command bool

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    force_new_deployment bool

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    health_check_grace_period_seconds int

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    iam_role str

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    launch_type str

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    load_balancers Sequence[ServiceLoadBalancerArgs]

    Configuration block for load balancers. See below.

    name str

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    network_configuration ServiceNetworkConfigurationArgs

    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. See below.

    ordered_placement_strategies Sequence[ServiceOrderedPlacementStrategyArgs]

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    placement_constraints Sequence[ServicePlacementConstraintArgs]

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    platform_version str

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    propagate_tags str

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    scheduling_strategy str

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    service_connect_configuration ServiceServiceConnectConfigurationArgs

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    service_registries ServiceServiceRegistriesArgs

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    tags Mapping[str, str]

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tags_all Mapping[str, str]

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    task_definition str

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    triggers Mapping[str, str]

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    wait_for_steady_state bool

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    alarms Property Map

    Information about the CloudWatch alarms. See below.

    capacityProviderStrategies List<Property Map>

    Capacity provider strategies to use for the service. Can be one or more. These can be updated without destroying and recreating the service only if force_new_deployment = true and not changing from 0 capacity_provider_strategy blocks to greater than 0, or vice versa. See below.

    cluster String

    ARN of an ECS cluster.

    deploymentCircuitBreaker Property Map

    Configuration block for deployment circuit breaker. See below.

    deploymentController Property Map

    Configuration block for deployment controller configuration. See below.

    deploymentMaximumPercent Number

    Upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment. Not valid when using the DAEMON scheduling strategy.

    deploymentMinimumHealthyPercent Number

    Lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running and healthy in a service during a deployment.

    desiredCount Number

    Number of instances of the task definition to place and keep running. Defaults to 0. Do not specify if using the DAEMON scheduling strategy.

    enableEcsManagedTags Boolean

    Specifies whether to enable Amazon ECS managed tags for the tasks within the service.

    enableExecuteCommand Boolean

    Specifies whether to enable Amazon ECS Exec for the tasks within the service.

    forceNewDeployment Boolean

    Enable to force a new task deployment of the service. This can be used to update tasks to use a newer Docker image with same image/tag combination (e.g., myimage:latest), roll Fargate tasks onto a newer platform version, or immediately deploy ordered_placement_strategy and placement_constraints updates.

    healthCheckGracePeriodSeconds Number

    Seconds to ignore failing load balancer health checks on newly instantiated tasks to prevent premature shutdown, up to 2147483647. Only valid for services configured to use load balancers.

    iamRole String

    ARN of the IAM role that allows Amazon ECS to make calls to your load balancer on your behalf. This parameter is required if you are using a load balancer with your service, but only if your task definition does not use the awsvpc network mode. If using awsvpc network mode, do not specify this role. If your account has already created the Amazon ECS service-linked role, that role is used by default for your service unless you specify a role here.

    launchType String

    Launch type on which to run your service. The valid values are EC2, FARGATE, and EXTERNAL. Defaults to EC2.

    loadBalancers List<Property Map>

    Configuration block for load balancers. See below.

    name String

    Name of the service (up to 255 letters, numbers, hyphens, and underscores)

    The following arguments are optional:

    networkConfiguration Property Map

    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. See below.

    orderedPlacementStrategies List<Property Map>

    Service level strategy rules that are taken into consideration during task placement. List from top to bottom in order of precedence. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. The maximum number of ordered_placement_strategy blocks is 5. See below.

    placementConstraints List<Property Map>

    Rules that are taken into consideration during task placement. Updates to this configuration will take effect next task deployment unless force_new_deployment is enabled. Maximum number of placement_constraints is 10. See below.

    platformVersion String

    Platform version on which to run your service. Only applicable for launch_type set to FARGATE. Defaults to LATEST. More information about Fargate platform versions can be found in the AWS ECS User Guide.

    propagateTags String

    Specifies whether to propagate the tags from the task definition or the service to the tasks. The valid values are SERVICE and TASK_DEFINITION.

    schedulingStrategy String

    Scheduling strategy to use for the service. The valid values are REPLICA and DAEMON. Defaults to REPLICA. Note that Tasks using the Fargate launch type or the CODE_DEPLOY or EXTERNAL deployment controller types don't support the DAEMON scheduling strategy.

    serviceConnectConfiguration Property Map

    The ECS Service Connect configuration for this service to discover and connect to services, and be discovered by, and connected from, other services within a namespace. See below.

    serviceRegistries Property Map

    Service discovery registries for the service. The maximum number of service_registries blocks is 1. See below.

    tags Map<String>

    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    tagsAll Map<String>

    A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated:

    Please use tags instead.

    taskDefinition String

    Family and revision (family:revision) or full ARN of the task definition that you want to run in your service. Required unless using the EXTERNAL deployment controller. If a revision is not specified, the latest ACTIVE revision is used.

    triggers Map<String>

    Map of arbitrary keys and values that, when changed, will trigger an in-place update (redeployment). Useful with timestamp(). See example above.

    waitForSteadyState Boolean

    If true, this provider will wait for the service to reach a steady state (like aws ecs wait services-stable) before continuing. Default false.

    Supporting Types

    ServiceAlarms, ServiceAlarmsArgs

    AlarmNames List<string>

    One or more CloudWatch alarm names.

    Enable bool

    Determines whether to use the CloudWatch alarm option in the service deployment process.

    Rollback bool

    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.

    AlarmNames []string

    One or more CloudWatch alarm names.

    Enable bool

    Determines whether to use the CloudWatch alarm option in the service deployment process.

    Rollback bool

    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.

    alarmNames List<String>

    One or more CloudWatch alarm names.

    enable Boolean

    Determines whether to use the CloudWatch alarm option in the service deployment process.

    rollback Boolean

    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.

    alarmNames string[]

    One or more CloudWatch alarm names.

    enable boolean

    Determines whether to use the CloudWatch alarm option in the service deployment process.

    rollback boolean

    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.

    alarm_names Sequence[str]

    One or more CloudWatch alarm names.

    enable bool

    Determines whether to use the CloudWatch alarm option in the service deployment process.

    rollback bool

    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.

    alarmNames List<String>

    One or more CloudWatch alarm names.

    enable Boolean

    Determines whether to use the CloudWatch alarm option in the service deployment process.

    rollback Boolean

    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.

    ServiceCapacityProviderStrategy, ServiceCapacityProviderStrategyArgs

    CapacityProvider string

    Short name of the capacity provider.

    Base int

    Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.

    Weight int

    Relative percentage of the total number of launched tasks that should use the specified capacity provider.

    CapacityProvider string

    Short name of the capacity provider.

    Base int

    Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.

    Weight int

    Relative percentage of the total number of launched tasks that should use the specified capacity provider.

    capacityProvider String

    Short name of the capacity provider.

    base Integer

    Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.

    weight Integer

    Relative percentage of the total number of launched tasks that should use the specified capacity provider.

    capacityProvider string

    Short name of the capacity provider.

    base number

    Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.

    weight number

    Relative percentage of the total number of launched tasks that should use the specified capacity provider.

    capacity_provider str

    Short name of the capacity provider.

    base int

    Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.

    weight int

    Relative percentage of the total number of launched tasks that should use the specified capacity provider.

    capacityProvider String

    Short name of the capacity provider.

    base Number

    Number of tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined.

    weight Number

    Relative percentage of the total number of launched tasks that should use the specified capacity provider.

    ServiceDeploymentCircuitBreaker, ServiceDeploymentCircuitBreakerArgs

    Enable bool

    Whether to enable the deployment circuit breaker logic for the service.

    Rollback bool

    Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.

    Enable bool

    Whether to enable the deployment circuit breaker logic for the service.

    Rollback bool

    Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.

    enable Boolean

    Whether to enable the deployment circuit breaker logic for the service.

    rollback Boolean

    Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.

    enable boolean

    Whether to enable the deployment circuit breaker logic for the service.

    rollback boolean

    Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.

    enable bool

    Whether to enable the deployment circuit breaker logic for the service.

    rollback bool

    Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.

    enable Boolean

    Whether to enable the deployment circuit breaker logic for the service.

    rollback Boolean

    Whether to enable Amazon ECS to roll back the service if a service deployment fails. If rollback is enabled, when a service deployment fails, the service is rolled back to the last deployment that completed successfully.

    ServiceDeploymentController, ServiceDeploymentControllerArgs

    Type string

    Type of deployment controller. Valid values: CODE_DEPLOY, ECS, EXTERNAL. Default: ECS.

    Type string

    Type of deployment controller. Valid values: CODE_DEPLOY, ECS, EXTERNAL. Default: ECS.

    type String

    Type of deployment controller. Valid values: CODE_DEPLOY, ECS, EXTERNAL. Default: ECS.

    type string

    Type of deployment controller. Valid values: CODE_DEPLOY, ECS, EXTERNAL. Default: ECS.

    type str

    Type of deployment controller. Valid values: CODE_DEPLOY, ECS, EXTERNAL. Default: ECS.

    type String

    Type of deployment controller. Valid values: CODE_DEPLOY, ECS, EXTERNAL. Default: ECS.

    ServiceLoadBalancer, ServiceLoadBalancerArgs

    ContainerName string

    Name of the container to associate with the load balancer (as it appears in a container definition).

    ContainerPort int

    Port on the container to associate with the load balancer.

    Version note: Multiple load_balancer configuration block support was added in version 2.22.0 of the provider. This allows configuration of ECS service support for multiple target groups.

    ElbName string

    Name of the ELB (Classic) to associate with the service.

    TargetGroupArn string

    ARN of the Load Balancer target group to associate with the service.

    ContainerName string

    Name of the container to associate with the load balancer (as it appears in a container definition).

    ContainerPort int

    Port on the container to associate with the load balancer.

    Version note: Multiple load_balancer configuration block support was added in version 2.22.0 of the provider. This allows configuration of ECS service support for multiple target groups.

    ElbName string

    Name of the ELB (Classic) to associate with the service.

    TargetGroupArn string

    ARN of the Load Balancer target group to associate with the service.

    containerName String

    Name of the container to associate with the load balancer (as it appears in a container definition).

    containerPort Integer

    Port on the container to associate with the load balancer.

    Version note: Multiple load_balancer configuration block support was added in version 2.22.0 of the provider. This allows configuration of ECS service support for multiple target groups.

    elbName String

    Name of the ELB (Classic) to associate with the service.

    targetGroupArn String

    ARN of the Load Balancer target group to associate with the service.

    containerName string

    Name of the container to associate with the load balancer (as it appears in a container definition).

    containerPort number

    Port on the container to associate with the load balancer.

    Version note: Multiple load_balancer configuration block support was added in version 2.22.0 of the provider. This allows configuration of ECS service support for multiple target groups.

    elbName string

    Name of the ELB (Classic) to associate with the service.

    targetGroupArn string

    ARN of the Load Balancer target group to associate with the service.

    container_name str

    Name of the container to associate with the load balancer (as it appears in a container definition).

    container_port int

    Port on the container to associate with the load balancer.

    Version note: Multiple load_balancer configuration block support was added in version 2.22.0 of the provider. This allows configuration of ECS service support for multiple target groups.

    elb_name str

    Name of the ELB (Classic) to associate with the service.

    target_group_arn str

    ARN of the Load Balancer target group to associate with the service.

    containerName String

    Name of the container to associate with the load balancer (as it appears in a container definition).

    containerPort Number

    Port on the container to associate with the load balancer.

    Version note: Multiple load_balancer configuration block support was added in version 2.22.0 of the provider. This allows configuration of ECS service support for multiple target groups.

    elbName String

    Name of the ELB (Classic) to associate with the service.

    targetGroupArn String

    ARN of the Load Balancer target group to associate with the service.

    ServiceNetworkConfiguration, ServiceNetworkConfigurationArgs

    Subnets List<string>

    Subnets associated with the task or service.

    AssignPublicIp bool

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    For more information, see Task Networking

    SecurityGroups List<string>

    Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.

    Subnets []string

    Subnets associated with the task or service.

    AssignPublicIp bool

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    For more information, see Task Networking

    SecurityGroups []string

    Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.

    subnets List<String>

    Subnets associated with the task or service.

    assignPublicIp Boolean

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    For more information, see Task Networking

    securityGroups List<String>

    Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.

    subnets string[]

    Subnets associated with the task or service.

    assignPublicIp boolean

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    For more information, see Task Networking

    securityGroups string[]

    Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.

    subnets Sequence[str]

    Subnets associated with the task or service.

    assign_public_ip bool

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    For more information, see Task Networking

    security_groups Sequence[str]

    Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.

    subnets List<String>

    Subnets associated with the task or service.

    assignPublicIp Boolean

    Assign a public IP address to the ENI (Fargate launch type only). Valid values are true or false. Default false.

    For more information, see Task Networking

    securityGroups List<String>

    Security groups associated with the task or service. If you do not specify a security group, the default security group for the VPC is used.

    ServiceOrderedPlacementStrategy, ServiceOrderedPlacementStrategyArgs

    Type string

    Type of placement strategy. Must be one of: binpack, random, or spread

    Field string

    For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance. For the binpack type, valid values are memory and cpu. For the random type, this attribute is not needed. For more information, see Placement Strategy.

    Note: for spread, host and instanceId will be normalized, by AWS, to be instanceId. This means the statefile will show instanceId but your config will differ if you use host.

    Type string

    Type of placement strategy. Must be one of: binpack, random, or spread

    Field string

    For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance. For the binpack type, valid values are memory and cpu. For the random type, this attribute is not needed. For more information, see Placement Strategy.

    Note: for spread, host and instanceId will be normalized, by AWS, to be instanceId. This means the statefile will show instanceId but your config will differ if you use host.

    type String

    Type of placement strategy. Must be one of: binpack, random, or spread

    field String

    For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance. For the binpack type, valid values are memory and cpu. For the random type, this attribute is not needed. For more information, see Placement Strategy.

    Note: for spread, host and instanceId will be normalized, by AWS, to be instanceId. This means the statefile will show instanceId but your config will differ if you use host.

    type string

    Type of placement strategy. Must be one of: binpack, random, or spread

    field string

    For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance. For the binpack type, valid values are memory and cpu. For the random type, this attribute is not needed. For more information, see Placement Strategy.

    Note: for spread, host and instanceId will be normalized, by AWS, to be instanceId. This means the statefile will show instanceId but your config will differ if you use host.

    type str

    Type of placement strategy. Must be one of: binpack, random, or spread

    field str

    For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance. For the binpack type, valid values are memory and cpu. For the random type, this attribute is not needed. For more information, see Placement Strategy.

    Note: for spread, host and instanceId will be normalized, by AWS, to be instanceId. This means the statefile will show instanceId but your config will differ if you use host.

    type String

    Type of placement strategy. Must be one of: binpack, random, or spread

    field String

    For the spread placement strategy, valid values are instanceId (or host, which has the same effect), or any platform or custom attribute that is applied to a container instance. For the binpack type, valid values are memory and cpu. For the random type, this attribute is not needed. For more information, see Placement Strategy.

    Note: for spread, host and instanceId will be normalized, by AWS, to be instanceId. This means the statefile will show instanceId but your config will differ if you use host.

    ServicePlacementConstraint, ServicePlacementConstraintArgs

    Type string

    Type of constraint. The only valid values at this time are memberOf and distinctInstance.

    Expression string

    Cluster Query Language expression to apply to the constraint. Does not need to be specified for the distinctInstance type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.

    Type string

    Type of constraint. The only valid values at this time are memberOf and distinctInstance.

    Expression string

    Cluster Query Language expression to apply to the constraint. Does not need to be specified for the distinctInstance type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.

    type String

    Type of constraint. The only valid values at this time are memberOf and distinctInstance.

    expression String

    Cluster Query Language expression to apply to the constraint. Does not need to be specified for the distinctInstance type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.

    type string

    Type of constraint. The only valid values at this time are memberOf and distinctInstance.

    expression string

    Cluster Query Language expression to apply to the constraint. Does not need to be specified for the distinctInstance type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.

    type str

    Type of constraint. The only valid values at this time are memberOf and distinctInstance.

    expression str

    Cluster Query Language expression to apply to the constraint. Does not need to be specified for the distinctInstance type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.

    type String

    Type of constraint. The only valid values at this time are memberOf and distinctInstance.

    expression String

    Cluster Query Language expression to apply to the constraint. Does not need to be specified for the distinctInstance type. For more information, see Cluster Query Language in the Amazon EC2 Container Service Developer Guide.

    ServiceServiceConnectConfiguration, ServiceServiceConnectConfigurationArgs

    Enabled bool

    Specifies whether to use Service Connect with this service.

    LogConfiguration ServiceServiceConnectConfigurationLogConfiguration

    The log configuration for the container. See below.

    Namespace string

    The namespace name or ARN of the aws.servicediscovery.HttpNamespace for use with Service Connect.

    Services List<ServiceServiceConnectConfigurationService>

    The list of Service Connect service objects. See below.

    Enabled bool

    Specifies whether to use Service Connect with this service.

    LogConfiguration ServiceServiceConnectConfigurationLogConfiguration

    The log configuration for the container. See below.

    Namespace string

    The namespace name or ARN of the aws.servicediscovery.HttpNamespace for use with Service Connect.

    Services []ServiceServiceConnectConfigurationService

    The list of Service Connect service objects. See below.

    enabled Boolean

    Specifies whether to use Service Connect with this service.

    logConfiguration ServiceServiceConnectConfigurationLogConfiguration

    The log configuration for the container. See below.

    namespace String

    The namespace name or ARN of the aws.servicediscovery.HttpNamespace for use with Service Connect.

    services List<ServiceServiceConnectConfigurationService>

    The list of Service Connect service objects. See below.

    enabled boolean

    Specifies whether to use Service Connect with this service.

    logConfiguration ServiceServiceConnectConfigurationLogConfiguration

    The log configuration for the container. See below.

    namespace string

    The namespace name or ARN of the aws.servicediscovery.HttpNamespace for use with Service Connect.

    services ServiceServiceConnectConfigurationService[]

    The list of Service Connect service objects. See below.

    enabled bool

    Specifies whether to use Service Connect with this service.

    log_configuration ServiceServiceConnectConfigurationLogConfiguration

    The log configuration for the container. See below.

    namespace str

    The namespace name or ARN of the aws.servicediscovery.HttpNamespace for use with Service Connect.

    services Sequence[ServiceServiceConnectConfigurationService]

    The list of Service Connect service objects. See below.

    enabled Boolean

    Specifies whether to use Service Connect with this service.

    logConfiguration Property Map

    The log configuration for the container. See below.

    namespace String

    The namespace name or ARN of the aws.servicediscovery.HttpNamespace for use with Service Connect.

    services List<Property Map>

    The list of Service Connect service objects. See below.

    ServiceServiceConnectConfigurationLogConfiguration, ServiceServiceConnectConfigurationLogConfigurationArgs

    LogDriver string

    The log driver to use for the container.

    Options Dictionary<string, string>

    The configuration options to send to the log driver.

    SecretOptions List<ServiceServiceConnectConfigurationLogConfigurationSecretOption>

    The secrets to pass to the log configuration. See below.

    LogDriver string

    The log driver to use for the container.

    Options map[string]string

    The configuration options to send to the log driver.

    SecretOptions []ServiceServiceConnectConfigurationLogConfigurationSecretOption

    The secrets to pass to the log configuration. See below.

    logDriver String

    The log driver to use for the container.

    options Map<String,String>

    The configuration options to send to the log driver.

    secretOptions List<ServiceServiceConnectConfigurationLogConfigurationSecretOption>

    The secrets to pass to the log configuration. See below.

    logDriver string

    The log driver to use for the container.

    options {[key: string]: string}

    The configuration options to send to the log driver.

    secretOptions ServiceServiceConnectConfigurationLogConfigurationSecretOption[]

    The secrets to pass to the log configuration. See below.

    log_driver str

    The log driver to use for the container.

    options Mapping[str, str]

    The configuration options to send to the log driver.

    secret_options Sequence[ServiceServiceConnectConfigurationLogConfigurationSecretOption]

    The secrets to pass to the log configuration. See below.

    logDriver String

    The log driver to use for the container.

    options Map<String>

    The configuration options to send to the log driver.

    secretOptions List<Property Map>

    The secrets to pass to the log configuration. See below.

    ServiceServiceConnectConfigurationLogConfigurationSecretOption, ServiceServiceConnectConfigurationLogConfigurationSecretOptionArgs

    Name string

    The name of the secret.

    ValueFrom string

    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.

    Name string

    The name of the secret.

    ValueFrom string

    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.

    name String

    The name of the secret.

    valueFrom String

    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.

    name string

    The name of the secret.

    valueFrom string

    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.

    name str

    The name of the secret.

    value_from str

    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.

    name String

    The name of the secret.

    valueFrom String

    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.

    ServiceServiceConnectConfigurationService, ServiceServiceConnectConfigurationServiceArgs

    PortName string

    The name of one of the portMappings from all the containers in the task definition of this Amazon ECS service.

    ClientAlias List<ServiceServiceConnectConfigurationServiceClientAlias>

    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. See below.

    DiscoveryName string

    The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.

    IngressPortOverride int

    The port number for the Service Connect proxy to listen on.

    PortName string

    The name of one of the portMappings from all the containers in the task definition of this Amazon ECS service.

    ClientAlias []ServiceServiceConnectConfigurationServiceClientAlias

    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. See below.

    DiscoveryName string

    The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.

    IngressPortOverride int

    The port number for the Service Connect proxy to listen on.

    portName String

    The name of one of the portMappings from all the containers in the task definition of this Amazon ECS service.

    clientAlias List<ServiceServiceConnectConfigurationServiceClientAlias>

    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. See below.

    discoveryName String

    The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.

    ingressPortOverride Integer

    The port number for the Service Connect proxy to listen on.

    portName string

    The name of one of the portMappings from all the containers in the task definition of this Amazon ECS service.

    clientAlias ServiceServiceConnectConfigurationServiceClientAlias[]

    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. See below.

    discoveryName string

    The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.

    ingressPortOverride number

    The port number for the Service Connect proxy to listen on.

    port_name str

    The name of one of the portMappings from all the containers in the task definition of this Amazon ECS service.

    client_alias Sequence[ServiceServiceConnectConfigurationServiceClientAlias]

    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. See below.

    discovery_name str

    The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.

    ingress_port_override int

    The port number for the Service Connect proxy to listen on.

    portName String

    The name of one of the portMappings from all the containers in the task definition of this Amazon ECS service.

    clientAlias List<Property Map>

    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. See below.

    discoveryName String

    The name of the new AWS Cloud Map service that Amazon ECS creates for this Amazon ECS service.

    ingressPortOverride Number

    The port number for the Service Connect proxy to listen on.

    ServiceServiceConnectConfigurationServiceClientAlias, ServiceServiceConnectConfigurationServiceClientAliasArgs

    Port int

    The listening port number for the Service Connect proxy. This port is available inside of all of the tasks within the same namespace.

    DnsName string

    The name that you use in the applications of client tasks to connect to this service.

    Port int

    The listening port number for the Service Connect proxy. This port is available inside of all of the tasks within the same namespace.

    DnsName string

    The name that you use in the applications of client tasks to connect to this service.

    port Integer

    The listening port number for the Service Connect proxy. This port is available inside of all of the tasks within the same namespace.

    dnsName String

    The name that you use in the applications of client tasks to connect to this service.

    port number

    The listening port number for the Service Connect proxy. This port is available inside of all of the tasks within the same namespace.

    dnsName string

    The name that you use in the applications of client tasks to connect to this service.

    port int

    The listening port number for the Service Connect proxy. This port is available inside of all of the tasks within the same namespace.

    dns_name str

    The name that you use in the applications of client tasks to connect to this service.

    port Number

    The listening port number for the Service Connect proxy. This port is available inside of all of the tasks within the same namespace.

    dnsName String

    The name that you use in the applications of client tasks to connect to this service.

    ServiceServiceRegistries, ServiceServiceRegistriesArgs

    RegistryArn string

    ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(aws.servicediscovery.Service). For more information, see Service

    ContainerName string

    Container name value, already specified in the task definition, to be used for your service discovery service.

    ContainerPort int

    Port value, already specified in the task definition, to be used for your service discovery service.

    Port int

    Port value used if your Service Discovery service specified an SRV record.

    RegistryArn string

    ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(aws.servicediscovery.Service). For more information, see Service

    ContainerName string

    Container name value, already specified in the task definition, to be used for your service discovery service.

    ContainerPort int

    Port value, already specified in the task definition, to be used for your service discovery service.

    Port int

    Port value used if your Service Discovery service specified an SRV record.

    registryArn String

    ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(aws.servicediscovery.Service). For more information, see Service

    containerName String

    Container name value, already specified in the task definition, to be used for your service discovery service.

    containerPort Integer

    Port value, already specified in the task definition, to be used for your service discovery service.

    port Integer

    Port value used if your Service Discovery service specified an SRV record.

    registryArn string

    ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(aws.servicediscovery.Service). For more information, see Service

    containerName string

    Container name value, already specified in the task definition, to be used for your service discovery service.

    containerPort number

    Port value, already specified in the task definition, to be used for your service discovery service.

    port number

    Port value used if your Service Discovery service specified an SRV record.

    registry_arn str

    ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(aws.servicediscovery.Service). For more information, see Service

    container_name str

    Container name value, already specified in the task definition, to be used for your service discovery service.

    container_port int

    Port value, already specified in the task definition, to be used for your service discovery service.

    port int

    Port value used if your Service Discovery service specified an SRV record.

    registryArn String

    ARN of the Service Registry. The currently supported service registry is Amazon Route 53 Auto Naming Service(aws.servicediscovery.Service). For more information, see Service

    containerName String

    Container name value, already specified in the task definition, to be used for your service discovery service.

    containerPort Number

    Port value, already specified in the task definition, to be used for your service discovery service.

    port Number

    Port value used if your Service Discovery service specified an SRV record.

    Import

    Using pulumi import, import ECS services using the name together with ecs cluster name. For example:

     $ pulumi import aws:ecs/service:Service imported cluster-name/service-name
    

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the aws Terraform Provider.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.3.0 published on Thursday, Sep 28, 2023 by Pulumi