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:
- In the navigation pane, choose Task Definitions.
- Then click the Create new Task Definition button.
- Select FARGATE as the launch type compatibility and then click Next Step.
- Name the task definition pets-task-def.
- Under the Task Size section, select 1 GB for task memory and 0.5 for task CPU.
- 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
- Then click the Add. button. Now we're ready to actually run a task from this task description in our pets cluster.