Authoring a task definition

We're starting with a simple task definition, which we then test and evolve until we have our pets application up and running. Proceed with the following steps:

  1. In the navigation pane, choose Task Definitions.

 

  1. Then click the Create new Task Definition button.
  2. Select FARGATE as the launch type compatibility and then click Next Step
  3. Name the task definition pets-task-def.
  4. Under the Task Size section, select 1 GB for task memory and 0.5 for task CPU.
  5. Next, click the Add container button. In the dialog box, enter web as the name and nginx:alpine as the image. Under the Port mappings section, add port 80:
Adding a container to the ECS task definition
  1. Then click the Add. button. Now we're ready to actually run a task from this task description in our pets cluster.