AWS ECS Fargate – Deploy and Run Multi-Container Web Application (.NET Core, Angular, Postgres)

Introduction

With AWS Fargate, we can run applications without managing servers. Fargate is a serverless compute engine for containers.

In previous post, we covered basics of AWS Fargate and took a step by step approach to deploy and run a .NET Core Web API application on AWS Fargate Service. We used AWS Fargate web console for most of the steps.

Today, we’ll take one step further and deploy a more complex web application to AWS ECS Fargate infrastructure. Also, this time, we’ll use docker cli instead of setting up infrastructure ourselves using AWS Web management console.

Following will be the output of our exercise today. A web application, running in AWS ECS Fargate and publicly available.

Initial Steps

To start with, we need an application.

You can use your own application for the exercise, if you like.

I’ve an existing application which I’ve used for other posts and demos and if you are following along, you might already familiar with it.

The application has following parts

  • Angular FrontEnd
  • .NET Core WebAPI
  • Postgres Database

Subscribe to get access

Read more of this content when you subscribe today.

The load balancer is setup with a DNS record and we can use it to access our application:

here is the link for the load balancer to access the application.

With this our application is deployed and running in AWS ECS cluster using serverless Fargate type.

Related Articles

Summary

In this post, we saw that how we can deploy a multi-container application to AWS Elastic Container Service using docker compose and a simple docker-compose yml file.

We learn how to create a docker ecs context and then set it as default context to use docker cli to work with AWS ECS.

Let me know if you have any questions or comments. Till next time, happy coding.


Discover more from Hex Quote

Subscribe to get the latest posts sent to your email.

Discover more from Hex Quote

Subscribe now to keep reading and get access to the full archive.

Continue reading