AWS Fargate in a Nutshell..

Selçuk KUBUR
5 min readDec 24, 2019

--

AWS Fargate is one of the biggest services in the world of containers. Announced by Amazon in late 2017 and took many attentions by DevOps teams.

Fargate, an orchestration tool for the AWS Elastic Container Service (ECS) and Elastic Kubernetes Service (EKS) , takes away the need to worry about the setting up infrastructure that containers run on, and handles the scaling of the infrastructure for you automatically. As a result, you don’t need to worry about patching, cluster capacity management, or infrastructure management. This will allows you to focus purely on your application development and the deployment of it to containers.

That is easy to do for Fargate. But let’s dive into its specifics. In this article, we’ll cover these objectives:

  • Use cases for Fargate?
  • How does this set the scene for future container usage?
  • Getting started with Fargate
  • Deploying a sample application

Use cases for Fargate?

I can easily say that Fargate is not different from standard container scenarios. You should feel as comfortable deploying standard micro-services on Fargate as you would deploying to Docker cluster. Many business are now looking at migrating on-premises applications to containers architectures. Fargate takes away this headache by allowing you to think purely about building your application and deploying it.

How does this set the scene for future container usage?

Fargate is the ability to make containers more cloud-friendly, while also reducing the amount of time that engineers need to spend focusing on infrastructure management. The ability to simply choose the amount of CPU and RAM resources that your application requires, then click a button to deploy the service and that’s it.

Eventually Fargate as businesses look to move away from paying large sums upfront for hardware they may or may not use and instead rely on a cloud service to auto-scale based on their application requirements.

Getting started with AWS Fargate

In order to get started with Fargate, you will need to have an AWS account that is ready to use. You can sign up for one at the following URL as Free Tier: https://portal.aws.amazon.com/billing/signup#/start

Once you’ve created your account, you can use Fargate on many regions.

in next step , we can get started by navigating to the following link: https://console.aws.amazon.com/ecs/home#/firstRun

Deploying a sample application

You should now see the following wizard page:

For the purposes of this article, we’re going to use the sample-app provided by AWS, so lets select that and leave the task definition configuration items as they are, then click “Next.”

Next, we can define our service. You can see that our security groups will be created for us automatically, and that we have an option to choose a load balancer. So let’s go ahead and use the Application Load Balancer, then click “Next.”

We then get a reminder that all infrastructure is managed and configured by AWS automatically, with no manual intervention required by us. Great! This page also allows us to set a cluster name and choose a VPC/Subnet. For the latter two, I’m going to let AWS automatically create this for me.

Now, click “Next.”

On the final page, we get to review our selections through the last three steps. We can see that our sample application is getting deployed with Apache 2.4, 512MB RAM, and will be listening on port 80 (HTTP). Furthermore, the load balancer we’ve chosen to create will also be listening on port 80.(later you can add other listening port and targets)

If you’re done with your selections, click the Create button to proceed.

On the “Launch Status” page, you will see a real-time update on the various backend infrastructure services being created to deploy the sample application. This is a perfect time to observe just how much work Fargate is allowing you to achieve in a short space of time without manual intervention from an engineer.

When the creation has completed, you will be able to click the “View Service” button at the top of the page. This takes you to a page detailing the service we’ve just created, and also allows you to make changes if required.

Once everything is showing ACTIVE, we’re ready to view our sample application. To do this, you’ll need to navigate to the Tasks tab, click the task, and look under the Network section where you’ll find IP addresses for your application. You’ll want to copy the Public IP, then paste this into your web browser.

If everything has finished creating, you should see the following when browsing to the IP address in question:

if you choice..

if you do not want to create a cluster with auto configuration and let AWS manage for you. You can create a custom cluster based on Windows or Linux depends to your needs.You can configure ALB (Application Load Balancer) and customize for your each deployed service by assigned a target group and listeners.

Happy deploying… in next article I’ll be focused to deploy .Net Core application to ECS with using VisualStudio/TFS Environment.

--

--

No responses yet