HAProxy dynamic backend discovery with Auto Scaling Group and Lambda using Terraform

In the previous two notes, I showed how to set up HAProxy to route traffic using the round-robin algorithm and distribute load based on a CPU agent running on backend Amazon EC2 instances. In both cases, the HAProxy configuration file contained the backend instances' private IPs at the time of creation. However, in production, workloads … Continue reading HAProxy dynamic backend discovery with Auto Scaling Group and Lambda using Terraform

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

Enforce Pod Security Standards on Amazon EKS

By default, every pod deployed to an Amazon EKS cluster can run as root, mount host paths, and escalate privileges. Most teams don't realize this until a security review surfaces it. While certain system-level workloads genuinely need elevated access (Karpenter, for example, requires host-level permissions to manage nodes), application pods rarely do. Without restrictions, a … Continue reading Enforce Pod Security Standards on Amazon EKS

Integrate AWS Secrets Manager with Amazon EKS using the Secrets Store CSI Driver

Containerized workloads on Amazon EKS often need access to sensitive credentials. A pod running a backend service might need a database connection string. A payment processor might require API keys. A message consumer might need authentication tokens for an external queue. In each case, the workload needs a way to retrieve secrets securely at runtime … Continue reading Integrate AWS Secrets Manager with Amazon EKS using the Secrets Store CSI Driver

Configure EKS Pod Identity for Secure AWS Access using Terraform

Containerized workloads running on Amazon EKS frequently need to interact with other AWS services. A pod running a web application might need to read secrets from AWS Secrets Manager. A monitoring agent might push metrics to CloudWatch. An autoscaler like Karpenter needs permissions to launch and terminate EC2 instances. In each case, the pod needs … Continue reading Configure EKS Pod Identity for Secure AWS Access using Terraform

Deploy Node.js Applications to AWS Elastic Beanstalk with Terraform and GitHub Actions

Deploy Node.js Applications to AWS Elastic Beanstalk with Terraform and GitHub Actions

Moving applications to the cloud delivers scalability, operational flexibility, and service choice that on-premises infrastructure can't match. The key to unlocking these advantages lies in selecting the right migration strategy. But the migration path matters - some strategies preserve existing code while others require complete rewrites, each with different resource requirements. Choose the right approach, … Continue reading Deploy Node.js Applications to AWS Elastic Beanstalk with Terraform and GitHub Actions

Eliminate sensitive values from Terraform state using write-only attributes

Terraform has emerged as the infrastructure as code (IAC) tool of choice for organizations due to its intuitive approach to infrastructure provisioning, declarative syntax, extensive provider ecosystem, and robust CI/CD integration. In my previous note, we learned how to securely store secrets in AWS Secrets Manager using Terraform and GitHub Actions. But there’s a critical … Continue reading Eliminate sensitive values from Terraform state using write-only attributes

Amazon S3-SNS-Lambda Event-Driven Architecture with Terraform

When development teams need to process thousands of file uploads daily across multiple applications, traditional polling-based monitoring systems create significant operational overhead and cost inefficiencies. Manual file-processing workflows can't scale to meet modern application demands, leading to delayed processing, wasted resources, and potential data loss during peak loads. Event-driven architecture solves this challenge by automatically … Continue reading Amazon S3-SNS-Lambda Event-Driven Architecture with Terraform

Automate AWS resource import into Terraform state using GitHub Actions

Organizations choose Terraform as their cloud infrastructure automation tool primarily for its features, such as idempotency, repeatability, and declarative configuration management, which enable teams to version-control their infrastructure alongside application code. However, many organizations don't have the luxury of starting fresh with Terraform. At times, organizations face scenarios in which critical cloud resources have already … Continue reading Automate AWS resource import into Terraform state using GitHub Actions

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