ECS Containers and Task Definitions

Managing Containers and Service with ECS

For an end-to-end example of creating an ECS Task Definition, Service, and Load Balancer, see this tutorial.

Services

Using the Services tab in the DuploCloud Portal (navigate to Cloud Services -> ECS and select the Services tab), you can display and manage the Services you have defined.

For ECS Services, select the Service Name and click the Actions menu to Edit or Delete Services, in addition to performing other actions, as shown below.

Kubernetes Containers

You can display and manage the Containers you have defined in the DuploCloud portal. Navigate to Kubernetes -> Containers.

Creating multiple containers for ECS Services using a Task Definition

You can create up to five (5) containers for ECS services by defining a Task Definition.

To designate a container as Essential, see Defining an Essential Container.

  1. In the DuploCloud Portal, navigate to Cloud Services -> ECS.

  2. In the Task Definitions tab, click Add. The Add Task Definition page displays.

  1. Specify a unique Name for the Task Definition.

  2. From the vCPUs list box, select the number of CPUs to be consumed by the task and change other defaults, if needed.

  3. In the Container - 1 area, specify the Container Name of the first container you want to create.

  4. In the Image field, specify the container Image name, as in the example above.

  5. Specify Port Mappings, and Add New mappings or Delete them, if needed.

  6. Click Submit. Your Task Definition for multiple ECS Service containers is created.

Editing multiple containers for ECS Services

To edit the created Task Definition in order to add or delete multiple containers, select the Task Definition in the Task Definitions tab, and from the Actions menu, select Edit Task Definition.

Defining an Essential Container

In AWS ECS, an essential container is a key component of a task definition. An essential container is one that must successfully complete for the task to be considered healthy. If an essential container fails or stops for any reason, the entire task is marked as failed. Essential containers are commonly used to run the main application or service within the task.

By designating containers as essential or non-essential, you define the dependencies and relationships between the containers in your task definition. This allows ECS to properly manage and monitor the overall health and lifecycle of the task, ensuring that the essential containers are always running and healthy.

To designate a container as Essential, follow the Creating multiple containers for ECS Services using a Task Definition procedure to create your containers, but before creating the container you want to designate as Essential, in the Container definition, select the Essential Container option, as in the example below.

Elastic Container Service (ECS) Fargate

Fargate is a technology that you can use with ECS to run containers without having to manage servers or clusters of EC2 instances.

For information about Fargate, contact the DuploCloud support team.

Create an ECS Service and Load Balancer

Follow this procedure to create the ECS Service from your Task Definition and define an associated Load Balancer to expose your application on the network.

Last updated

Logo

© DuploCloud, Inc. All rights reserved. DuploCloud trademarks used herein are registered trademarks of DuploCloud and affiliates