From the course: AWS DevOps: Continuous Docker Deployment to AWS Fargate from GitLab

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Creating a Fargate task with the CLI

Creating a Fargate task with the CLI

From the course: AWS DevOps: Continuous Docker Deployment to AWS Fargate from GitLab

Start my 1-month free trial

Creating a Fargate task with the CLI

- [Instructor] Before we launch our new container on Fargate, we first need to tell Fargate a bit about our container and what kind of resources to allocate to it. Let's see if we have any task definitions set up. In the Terminal window, type aws ecs list-task-definitions. Okay, so it looks like we don't have any yet so we're going to have to create one. To create a new task definition from the CLI, you type aws ecs register-task-definition, and then you give it the parameter, --cli-input-json, and then to give it the file, you say file://, and then you give it a relative or absolute path to where this file is on your computer. This is a large JSON file that's going to define the task definition. This is a big JSON file with a lot of options. So you can follow a few samples in the documentation to build one out, but AWS gave us an extra option in the CLI so you can actually generate a skeleton of this JSON file, and then fill in the values that you need. So to see the skeleton, remove…

Contents