This note continues the previous one, where I set up HAProxy on an Amazon EC2 instance to route traffic to backend compute instances using Terraform. In that note, the algorithm was round-robin. HAProxy internally manages this as weighted round-robin, and since nothing was configured for the weights, traffic was split evenly across both instances. In … Continue reading CPU-based routing with HAProxy agent-check on Amazon EC2
Tag: Amazon EC2
Create an HAProxy load balancer with Amazon EC2 and Terraform
Load balancers route traffic to backend servers using algorithms such as round-robin, least-connections, or weighted routing based on server capacity. As of June 2026, AWS provides managed Application and Network Load Balancers, which abstract away routing logic so software engineering teams can focus on application development. However, engineering teams sometimes need full control over traffic … Continue reading Create an HAProxy load balancer with Amazon EC2 and Terraform
Automated GitHub Self-Hosted Runner Cleanup: Lambda Functions and Auto Scaling Lifecycle Hooks
Running self-hosted GitHub runners on an Auto Scaling group enables organizations to have high availability during active development so that development teams do not have to compromise on runner availability. This allows development teams to have the same flexibility as that of a GitHub-hosted runner while also maintaining all the benefits of self-hosted runners, such … Continue reading Automated GitHub Self-Hosted Runner Cleanup: Lambda Functions and Auto Scaling Lifecycle Hooks
Build Secure GitHub Self-Hosted Runners on Amazon EC2 with Terraform
GitHub, in addition to being an excellent version control system, offers workflow automation capabilities (Actions) that enable testing, building, and deploying code based on triggers such as code commits, pull requests, or scheduled events. These workflows run on runners, which are virtual or physical machines that execute these workflow steps.While GitHub offers free hosted runners … Continue reading Build Secure GitHub Self-Hosted Runners on Amazon EC2 with Terraform
Automate Amazon Route 53 hosted zone, ACM, and Load Balancer provisioning with Terraform and GitHub Actions
AWS provides seamless integration to manage secure traffic routing through an Amazon Route 53 hosted zone to an Application Load Balancer (ALB), using a secure certificate from AWS Certificate Manager (ACM). I build upon a previously discussed use case such that by the end of this note, you'll have the concept of creating an ALB … Continue reading Automate Amazon Route 53 hosted zone, ACM, and Load Balancer provisioning with Terraform and GitHub Actions
Install and configure CloudWatch Logs agent on Amazon EC2 instance for Linux using user data
Amazon CloudWatch Logs Agent is a software component installed on servers that allows Cloud Engineering teams to monitor and collect log files from the servers and applications in real time. It sends log data to Amazon CloudWatch Logs, where they can be analyzed, searched, and visualized, thus making it easier to troubleshoot issues and monitor … Continue reading Install and configure CloudWatch Logs agent on Amazon EC2 instance for Linux using user data
Access Amazon ElastiCache for Memcached from an Amazon EC2 instance using Python
This note is the second part of my notes on Amazon ElastiCache for Memcached. In the first note, I demonstrated how to create an Amazon ElastiCache for Memcached using Terraform. In this note, I list the steps to create the additional infrastructure and access the Memcached cluster using Python. To accomplish the use-case, I'll use … Continue reading Access Amazon ElastiCache for Memcached from an Amazon EC2 instance using Python
Secure RDP Access to Amazon EC2 for Windows: Leveraging Fleet Manager and Session Manager
Fleet Manager is a service AWS Systems Manager provides to securely manage Amazon EC2 instances at scale. Cloud engineers can log in via remote desktop (RDP) to Amazon EC2 instances for Windows using Fleet Manager to perform troubleshooting or management tasks. Previously, a set of configurations were required to access an Amazon EC2 instance for … Continue reading Secure RDP Access to Amazon EC2 for Windows: Leveraging Fleet Manager and Session Manager
Install and configure CloudWatch Logs agent on Amazon EC2 instance for Windows using user data
Amazon CloudWatch is a monitoring and observability service that Amazon Web Services (AWS) provides. It monitors log files, collects and tracks metrics, sets alarms, and triggers actions to help AWS users ensure the health and performance of their applications and infrastructure resources. CloudWatch integrates with various AWS services, such as Amazon EC2, to provide comprehensive … Continue reading Install and configure CloudWatch Logs agent on Amazon EC2 instance for Windows using user data
Create an Amazon EC2 instance using Terraform with Session Manager access using VPC Endpoint
As a reader of this note, I believe you are familiar with Session Manager. Per AWS-Docs, Session Manager is a fully managed AWS Systems Manager capability that lets you manage your Amazon EC2 instances through an interactive one-click browser-based shell or through the AWS CLI. For Session Manager to function, the Amazon VPC requires access … Continue reading Create an Amazon EC2 instance using Terraform with Session Manager access using VPC Endpoint









