🥳
DevOps
  • Intro
  • Docker
    • Installing Docker and Docker Compose on an Ubuntu server:
    • Cannot perform an interactive login from a non TTY device
  • Git & Github
    • Auto-merge in github
    • Basic Recon with github actions
  • Dotnet
    • Amazon Lightsail for ASP.NET Core
    • AWS CodeBuild DotNet Core
    • Dotnet runtime: 7.0.2
    • Unable to locate package dotnet-sdk-8.0
    • Deploy a Dotnet Web on Ubuntu with Nginx Reserve Proxy
    • Unexpected Absence of .NET Core Runtime
    • Dotnet Runtime Missing (Solved)
  • Nginx
    • Service deployment and monitoring
    • Connection reset by peer
    • Deploy APIs on Nginx webserver in Ubuntu
    • Hide Nginx Server Info
    • Issuing SSL Certificate
    • Understanding SameSite cookies
    • Apache Tomcat
  • Ansible
    • Introduction
    • Ansible modules
    • Ansible Playbook
    • Handle lots of servers at one time
  • Jenkins
    • Attach trivy report on email (jenkins pipeline)
    • ng not found error while docker build in jenkins pipeline (script)
    • Auto Trigger Jenkins Build /Jobs with github webhook
    • Gradle for jenkins
  • Terraform
    • Terraform installation
    • Install jenkins docker image with Terraform
  • AWS
    • Hands-on labs
      • EC2 instance using AWS CLI
      • How to Create a Security Group
      • How to Create an AWS GP3 Volume
      • Subnet Creation Guide
      • Allocate Elastic IP
      • Create EC2 Instance Guide
      • Switching EC2 Instance Type
      • Assign Elastic IP to EC2 Instance
      • Enable EC2 Instance Termination Protection
      • Attach ENI to EC2 Instance Easily
      • Attach AWS Volume to EC2 Instance
      • How to Stop an Amazon EC2 Instance
      • How to Create an IAM User
      • EC2 Console Read-Only IAM Policy
      • How to Attach IAM Policy to User
      • Create EC2 IAM Role with Policy Guide
      • How to Delete an IAM Group
      • How to Delete an IAM Role
      • Private S3 Bucket Setup Guide
      • How to Create Public S3 Bucket
      • Enable S3 Bucket Versioning
      • Move Data into Existing S3 Bucket
      • Manage S3 Bucket Data Efficiently
      • Public RDS Instance Guide
      • Snapshot Creation for RDS Instances
      • Upgrade MySQL in RDS Using AWS Console
      • Remove RDS Instance Safely
      • How to Create a VPC
      • Understanding VPC CIDR
      • VPC IPv6 Implementation Guide
      • Create Private S3 Bucket Using AWS CLI
      • AWS CLI: Launch EC2 Instance Guide
      • Change EC2 Instance Type Using AWS CLI
      • AWS CLI: Delete EC2 Instance Guide
      • Host Apps on EC2 with Elastic IP
      • Host Apps on EC2 with Elastic IP
      • Increase EC2 Storage for Development
      • Launch EC2 Instances with Custom AMIs
      • Application Load Balancer Setup for EC2
      • EC2 Instance Setup and Cloud Watch Alarm
      • Set Up EC2 Web Server with Nginx
      • Migrate S3 Buckets with AWS CLI
      • Private RDS Setup for Development Projects
      • RDS Instance: Allow Public Access
      • Set Up Public VPC and EC2 for Internet Access
    • Install the CodeDeploy agent for Ubuntu Server
    • S3 Bucket Misconfiguration
    • Cloud Security Resources
    • Extend a Linux file system after resizing a volume
    • userdata for instances
    • Amazon EC2 User Data Scripts Dashboard
    • Patch Manager
  • Apache Solr
    • Introduction
    • Data Import Handler (DIH)
    • Create Core & Add Data in Solr
    • Import csv, xml data & Delete data
  • Kubernetes
    • K8s
    • Deploying Pods in Kubernetes Made Easy
    • Kubernetes Deployment for App Deployment
    • Kubernetes: Setup Namespaces and PODs
    • Kubernetes Pod Resource Limiting Guide
    • Kubernetes Pod Resource Limiting Guide
    • Kubernetes Rolling Updates Guide
    • Revert Deployment to Previous Version
    • Kubernetes Cronjob Scheduling Guide
    • Kubernetes Countdown Job Setup Guide
    • Kubernetes Time Check Pod Setup Guide
  • Prometheus & Grafana
    • Prometheus Installation
    • Grafana Installation
    • Telegraf
    • Influx DB
    • Prometheus alert rules
    • Config sysinfo-web
  • Splunk
    • Introduction
    • Uses of Splunk
    • Install Splunk on AWS EC2 Instance
    • Indexes in Splunk
      • Basic Searching
  • Linux Security
    • Package in linux
    • ICMP vulnerability:
    • Tunnelmole
  • Wazuh
    • Introduction
    • Creating an infra using Terraform
    • Manually creating aws infra
    • Ansible servers
    • Ansible (master with worker)
    • Wazuh manager and agent
    • Kibana
Powered by GitBook
On this page
  1. AWS
  2. Hands-on labs

Application Load Balancer Setup for EC2

PreviousLaunch EC2 Instances with Custom AMIsNextEC2 Instance Setup and Cloud Watch Alarm

Tasks

  • Set up an Application Load Balancer named xfusion-alb.

  • Create a target group named xfusion-tg.

  • Create a security group named xfusion-sg to open port 80 for the public.

  • Attach this security group to the ALB.

  • Configure the ALB to route traffic on port 80 to port 80 of the xfusion-ec2 instance.

  • Make necessary changes to the default security group attached to the EC2 instance if needed.

Steps

  1. Checkout the ec2 → instance (xfusion-ec2)

  2. Select load balancer.

  3. Create Application Load Balancer

    EC2 → Load balancers → Compare and select load balancer type

  4. Pick subnet from our ec2

  5. Name the load balancer.

  6. Select availability zone, atleast two; one from our ec2 subnet and another any of remaining subnet.

  7. Create target group.

    EC2 → Target groups → Create target group

    • Choose a target type → Instances

  8. Name the group, xfusion-tg.

  9. Select Next

  10. Successfully created the target group: xfusion-tg.

  11. Now, select a target group.

  12. Successfully created load balancer: xfusion-alb

  13. Security group (

    EC2 → Security Groups → sg-097258aa3bafd5395 - xfusion-sg

  14. Let’s config security group on instance

    ups → sg-05a1bf9fe7738fdb5 - default → Edit inbound rules

  15. Inbound security group rules successfully modified on security group

  16. Register targets

  17. EC2 → Target groups → xfusion-tg → Register targets

  18. Register pending targets

  19. One target registered successfully to xfusion-tg. And health status is healthy

  20. We have load balancer now.

  21. Now checkout the dns name.

Boom!! We finally did this: Setting Up an Application Load Balancer for an EC2 Instance. :)

#happylearning #loadbalancer #alb

sg-097258aa3bafd5395 | xfusion-sg) was created successfully
s to for alb.
EC2 → Security Gro
(sg-05a1bf9fe7738fdb5 | default)