When you have multiple applications which are running inside an ECS cluster or anywhere else then how can you use just one loadbalancer for all the applications.

Using separate loadbalancer for each of the services/applications will be more expensive as each LB cost around $15/month and if you have 5 services then this would be $75/month.

Example:

You have an application which is listening on port 8080 and it requires SSL certificates.

  • Application can listen on same or different port also

Solution

  • Define the instance port in the Target Group
  • configure the Target Group to use port 8080 or…


In this blog, we will deploy a container using docker-compose in ECS cluster.

You can follow this blog to deploy a docker container in ECS directly.

Prerequisite

  1. Configure aws credential
  2. Install aws cli version 2
  3. Clone this git repo

Agenda:

  1. Create new docker context
  2. Run docker compose to create a new ECS cluster

To run it from your local workstation, first you need to set the docker context to use the ECS to run the docker commands

Create new docker context

docker context create ecs myecs
docker context ls
docker context use myecs

Create a docker-compose.yaml file and provide…


In this blog, we will deploy a docker container in Amazon ECS(Elastic Container Service) using ECR ( Elastic Container Registry)

Prerequisite

  1. Configure aws credential
  2. Install aws cli version 2
  3. Clone this git repo
  4. Local workstation ( I am using AWS EC2 instance)

Agenda:

  1. Create and Push to ECR repository
  2. Create a ECS cluster
  3. Create a Task Definition
  4. Run the task
  5. Create a Service

Create a ECR repository

Go to AWS > ECR > Create a repository

Click on your repository


In this blog, we will be deploying this guestbook application using helm and add the Redis as a dependency.

Prerequisite

  1. Kubernetes Cluster Setup
  2. Clone this git repo

Setup a helm project

helm create guestbook
rm -rf guestbook/templates/tests

Adding a Redis Chart dependency

Chart dependencies are used to install other charts’ resources that a Helm chart may depend on.

In this example, we are using Redis as a database so we to need add this as a dependency.

First we can search the charts for redis

helm search hub redis

Now we will add the dependency section in the Charts.yaml


In this blog, we will run a Demo of creating an AWS Lambda Function which will convert a csv file into a json file.

Prerequisite

  1. Clone this git repo
  2. Refer this blog for basic understanding of AWS Lambda

For this we will use S3 bucket as a source where we will store the csv file that will trigger the lambda function and convert the file in json and store it in another bucket.

We will be creating below resources. You can refer the git repo

  1. Create source S3 bucket
  2. Create target S3 bucket
  3. Create a lambda function in python


In this blog we will learn about AWS Lambda and create a lambda function.

What is Serverless Compute ?

Serverless compute is a cloud computing execution model in which the AWS Cloud acts as the server and dynamically manages the allocation of machine resources.

  • AWS Lambda is the AWS serverless compute platform that enables you to run code without provisioning or managing servers.
  • With AWS Lambda, you can run code for nearly any type of application or backend service — with zero administration
  • Only upload your code, and AWS Lambda performs all the tasks you require to run and scale your code with high…


In this blog, we will explore basics of helm and how to create a custom helm chart.

Prerequisite:

  1. Helm should be installed

Agenda:

  1. Why Helm ?
  2. What is Helm ?
  3. Helm basic commands
  4. How Helm communicates with your Kubernetes Cluster
  5. How to find chart’s details
  6. Create a custom helm chart

How Kubernetes deployment works ?

In Kubernetes, if you have to deploy any application then at a minimum you need to create a these below components

  • secrets for database and admin console authentication
  • A ConfigMap for externalized database configuration
  • services for networking
  • A PersistentVolumeClaim for database storage
  • A StatefulSet


AWS::CloudFormation::Interface

This helps how to modify the ordering and presentation of parameters in the AWS CloudFormation console.

By default, parameters display in an alphabetical order by their logical IDs

The AWS::CloudFormation::Interface metadata key uses two child keys,

  1. ParameterGroups (you could group all EC2-related parameters in one group and all DB-related parameters in another group)
  • Each entry in ParameterGroups is defined as an object with a Label key and Parameters key


In this blog, we will explore AWS CloudFormation Init and will create an example of using all the cfn-init concepts

Agenda

  1. Basics of CloudFormation::Init
  2. cfn-init
  3. cfn-signal
  4. cfn-hup

AWS::CloudFormation::Init

Use the AWS::CloudFormation::Init type to include metadata on an Amazon EC2 instance


In this blog we will explore AWS CloudFormation with examples.

Prerequisite

  1. Clone this git repo
  2. AWS Account Setup

Agenda:

  1. CloudFormation Concepts (Stacks & ChangeSet)
  2. Parameters
  3. Mappings
  4. Conditions
  5. Outputs

AWS CloudFormation is used to describe and provision all of the infrastructure resources in your cloud environment.

  1. We called it as “Infrastructure as Code” which means that you are writing a code to create your infrastructure and it is repeatable and also version-able because you can store your code in your git repo.
  2. So to create an infrastructure on AWS you actually create a CloudFormation template.

AWS CloudFormation Concepts

  1. Stack

To create…

Nidhi

Devops Automation Enginneer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store