The following macros are not currently supported in the header:
  • unmigrated-wiki-markup

Documentation for Tasks for AWS 2.7 – other releases are available in the Tasks for AWS Documentation Directory.
View

Unknown macro: {spacejump}

or visit the current documentation home.

Using the Amazon ECS Service task in Bamboo

You can use the Amazon ECS Service task to create, update or delete an Amazon EC2 Container Service (ECS) service (see Deploying to Amazon ECS for an overview of the ECS component lifecycle and deployment workflow).

 

Configuration

To configure an Amazon ECS Service task:

  1. Navigate to the Tasks configuration tab for the job (this will be the default job if creating a new plan).
  2. Click the name of an existing Amazon ECS Service task, or click Add Task and then Amazon ECS Service to create a new task.
  3. Complete the following settings:

    1. Common to all tasks

      Task Description (Optional) Identify the purpose of the task.
      Disable this task

      Check, or clear, to selectively run this task.

      Action

      Each task supports one or more actions depending on the target AWS resource. Select the desired action and configure the action specific parameters below.

      RegionSelect the desired AWS Region. Alternatively, select [Use region variable ...] to supply the region dynamically via Bamboo variables (needs to be a region code such as ap-southeast-2) - refer to How to parametrize the AWS region via a Bamboo variable for details.
      ...Configure task/action specific parameters, see below ...
      AWS Security Credentials 
      SourceSelect the source for the required AWS Security Credentials - can be either Inline, an IAM Role for EC2 or a shared Identity Federation for AWS Connector.
      Connector(Conditional) Select the shared Identity Federation for AWS Connector. Alternatively, select [Use connector variable ...] to supply the connector dynamically via Bamboo variables (needs to be a connector id such as f24e81bc-7aff-42db-86a2-7cf82e24d871) - refer to How to parametrize the AWS connector via a Bamboo variable for details.

    2. Actions supported by this task:

       

      Create

       
      Cluster Name or ARN

      (Optional) Specify the short name or full Amazon Resource Name (ARN) of the cluster that you want to run your service on.

      •  (warning) If you do not specify a cluster, the default cluster is assumed. 
      ServiceSpecify the name of the service you want to create.
      Task Definition(Optional) Specify the family and revision (family:revision) or full Amazon Resource Name (ARN) of the task definition that you want to run in your service.
      Desired Count(Optional) Specify the  number of instantiations of the specified task definition that you would like to place and keep running on your cluster.
      Load Balancers(Optional) Specify one or more load balancer objects in JSON format, containing the load balancer name, the container name (as it appears in a container definition), and the container port to access from the load balancer.
      Role

      (Conditional) Specify the name or full Amazon Resource Name (ARN) of the IAM role that allows your Amazon ECS container agent to make calls to your load balancer on your behalf.

      •  (info)  This parameter is only required if you are using a load balancer with your service.

      Update

       
      Cluster Name or ARNsee Create above
      ServiceSpecify the name of the service you want to update.
      Task Definitionsee Create above
      Desired Countsee Create above

      Delete

       
      Cluster Name or ARNsee Create above
      ServiceSpecify the name of the service you want to delete.

Variables

All tasks support Bamboo Variable Substitution/Definition - this task's actions generate variables as follows:

A task's generated variables might get amended with respective AWS API additions over time - a live build log will always provide the most current variable shape accordingly

Create

Creating common variables for 1 services:
... custom.aws.ecs.service.resources: taws-it-270-nginx
Creating resource variables for service 'taws-it-270-nginx':
... custom.aws.ecs.service.resources.taws-it-270-nginx.ClusterArn: arn:aws:ecs:us-east-1:309600995652:cluster/taws-it-270-29
... custom.aws.ecs.service.resources.taws-it-270-nginx.RoleArn: arn:aws:iam::309600995652:role/amazon-ecs-service
... custom.aws.ecs.service.resources.taws-it-270-nginx.ServiceArn: arn:aws:ecs:us-east-1:309600995652:service/taws-it-270-nginx
... custom.aws.ecs.service.resources.taws-it-270-nginx.ServiceName: taws-it-270-nginx
... custom.aws.ecs.service.resources.taws-it-270-nginx.Status: ACTIVE
... custom.aws.ecs.service.resources.taws-it-270-nginx.TaskDefinition: arn:aws:ecs:us-east-1:309600995652:task-definition/taws-it-270-nginx:59
Creating common variables for first resource affected by task:
Creating resource variables for service 'taws-it-270-nginx':
... custom.aws.ecs.service.first.ClusterArn: arn:aws:ecs:us-east-1:309600995652:cluster/taws-it-270-29
... custom.aws.ecs.service.first.RoleArn: arn:aws:iam::309600995652:role/amazon-ecs-service
... custom.aws.ecs.service.first.ServiceArn: arn:aws:ecs:us-east-1:309600995652:service/taws-it-270-nginx
... custom.aws.ecs.service.first.ServiceName: taws-it-270-nginx
... custom.aws.ecs.service.first.Status: ACTIVE
... custom.aws.ecs.service.first.TaskDefinition: arn:aws:ecs:us-east-1:309600995652:task-definition/taws-it-270-nginx:59	

Update

See Create above.

Delete

See Create above.

How-to Articles

Frequently Asked Questions (FAQ)