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

Creating a Fargate cluster from the CLI

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

Start my 1-month free trial

Creating a Fargate cluster from the CLI

- [Instructor] For integrating Fargate into our DevOps practices, we're going to take a look at some of the commands that you can run from the AWS CLI to control Fargate. If you don't have the AWS CLI already installed, follow Amazon's guide within the docs for installing and configuring the CLI. If you'd like a video walkthrough about how to do this, search our catalog for the AWS CLI, and you'll find a few videos that'll walk you through this process. Open up a new terminal window. Creating an empty Fargate cluster via the CLI is pretty simple, because we aren't defining EC2 instance sizes or anything else yet. Type AWS space ECS space create dash cluster space dash dash cluster dash name, and then space, and we need to give our cluster a name. I'm going to call mine Fargate dash cluster. And then hit enter. The CLI will return to you the idea of the created cluster. In the AWS console, click on services, type in ECS, and click on the option that auto-completes. Underneath clusters, you can click on the Fargate cluster that we just created. Now, you likely won't be creating new clusters that often, but you could have a use case where you have scripted the creation of a cluster as part of a script to deploy your infrastructure in a new region, but I would recommend cloud formation if that more fits your case. Now that we have an empty Fargate cluster, let's create a task definition for our container.

Contents