Step 4: Create a Task Definition for an Application

Create a Task Definition for your application in AWS ECS

You enabled ECS cluster creation when you created the Infrastructure. In order to create a Service using ECS, you first need to create a Task Definition that serves as a blueprint for your application.

Once you create a Task Definition, you can run it as a Task or as a Service. In this tutorial, we run the Task Definition as a Service.

Estimated time to complete Step 4: 10 minutes.

Prerequisites

Before creating an RDS, verify that you completed the tasks in the previous tutorial steps. Using the DuploCloud Portal, confirm that:

Creating a Task Definition

  1. In the Tenant list box, select the dev01 Tenant.

    The DuploCloud Tenant list box with dev01 selected

  2. Navigate to Cloud Services -> ECS.

  3. In the Task Definition tab, click Add. The Add Task Definition-Basic Options area displays.

    The Add Task Definition-Basic Options area
  4. In the Name field, enter sample-task-def.

  5. From the vCPU list box, select 0.5 vCPU.

  6. From the Memory list box, select 1 GB.

  7. Click Next. The Advanced Options area displays.

    The Add Task Definition-Advanced Options page
  8. In the Container - 1 section, enter Container Name sample-task-def-c1.

  9. In the Image field, enter duplocloud/nodejs-hello:latest.

  10. In the Port Mappings section, in the Port field, enter 3000. Port mappings allow containers to access ports for the host container instance to send or receive traffic.

  11. Click Create.

Last updated

Was this helpful?