PlanHub · Construction SaaS

AWS platform on Terraform: blue/green delivery & event-driven jobs

I designed PlanHub's multi-tier AWS platform in Terraform, built QA/UAT/Prod delivery on CodePipeline with Boto3 blue/green cut-overs across 5 service tiers, moved routine operations onto 7 EventBridge-scheduled Lambda jobs, and tightened security by moving 39 SSH keys into 1Password.

Client
PlanHub
Role
Principal Consultant, DevOps (AWS infrastructure & delivery lead)
Delivered via
Ensono
Period
2022 – present
Cloud
AWS
5
service tiers on blue/green deployment
7
EventBridge-scheduled Lambda jobs
39
SSH keys migrated to 1Password
3
pipeline environments: QA, UAT, Prod
GitHub changes flow through CodePipeline to QA, UAT and Prod, where Boto3 blue/green automation shifts ALB listener rules and DNS between environments in a Terraform-defined VPC with RDS PostgreSQL, while EventBridge schedules drive Lambda jobs and Fivetran feeds Redshift for private QuickSight reporting.GitHub changes flow through CodePipeline to QA, UAT and Prod, where Boto3 blue/green automation shifts ALB listener rules and DNS between environments in a Terraform-defined VPC with RDS PostgreSQL, while EventBridge schedules drive Lambda jobs and Fivetran feeds Redshift for private QuickSight reporting.
fig. GitHub changes flow through CodePipeline to QA, UAT and Prod, where Boto3 blue/green automation shifts ALB listener rules and DNS between environments in a Terraform-defined VPC with RDS PostgreSQL, while EventBridge schedules drive Lambda jobs and Fivetran feeds Redshift for private QuickSight reporting.Scroll sideways or open full size.

Context

PlanHub runs a construction SaaS product on AWS. The engagement covered the whole platform: the network and data tier underneath the application, the pipeline that ships it, the scheduled jobs that keep it tidy, the analytics feed, and the security hygiene around access.

I owned the infrastructure and DevOps side end to end. The goal was a platform that is defined in code, releases without downtime, and does not depend on people remembering to run things.

Constraints

  • Production traffic during releases. A SaaS product used by customers cannot take a maintenance window for every deploy, so cut-overs had to be zero-downtime.
  • Several service tiers, one release process. Each of the 5 tiers needed the same deployment behaviour, not five hand-tuned variants.
  • Three environments that must stay alike. QA, UAT and Prod are only useful if what passes in one predicts what happens in the next.
  • Analytics without exposing data. Reporting had to reach the warehouse over private connectivity rather than a public endpoint.

What I did

  1. Multi-tier AWS infrastructure in Terraform. I designed the VPC, RDS PostgreSQL with read replicas, an Application Load Balancer, NAT Gateway, Route53 and ACM certificates, all as code.
  2. QA/UAT/Prod CI/CD. I built the delivery path on CodePipeline, CodeBuild and CodeDeploy with GitHub as the source, and added Slack notifications so release status reached the team without anyone watching a console.
  3. Blue/green deployment automation. I wrote the cut-over logic in Python with Boto3 and applied it across all 5 service tiers. It manages ALB listener rules and the DNS cut-over, so traffic moves to the new environment only when it is ready.
  4. Event-driven operations. I moved routine production chores onto 7 EventBridge schedules driving Lambda functions for archival, cleanup and push notifications.
  5. Analytics pipeline. I architected a Fivetran to Redshift pipeline and set up private VPC connectivity for QuickSight, so dashboards read from the warehouse without a public path.
  6. Security governance. I migrated 39 SSH keys into 1Password and deployed ClamAV scanning infrastructure.

Key decisions

Decision Why Trade-off
Blue/green over in-place deploys Switching ALB listener rules and DNS gives an instant, well-understood rollback: point traffic back at the old environment. Two environments run side by side during a release, which costs more for that window.
The same Boto3 cut-over automation for all 5 tiers Shared automation means a fix or improvement lands everywhere at once and every tier behaves the same on release day. The automation has to stay generic enough for every tier, which takes discipline as tiers diverge.
AWS-native pipeline tooling CodePipeline, CodeBuild and CodeDeploy sit inside the same account boundary and IAM model as the workloads they deploy. Less portable than a cloud-agnostic CI system.
EventBridge and Lambda for scheduled jobs Schedules become visible, versioned resources rather than cron entries on a server someone has to keep alive. Each job needs its own packaging, permissions and failure handling.
Private QuickSight connectivity Keeps the reporting path to Redshift off the public internet. More networking to design and maintain than a public endpoint.
SSH keys in a shared vault 39 keys in 1Password gives one place to see, rotate and revoke access. Engineers change how they fetch keys, which needs a short adjustment period.

Why blue/green at the load balancer

The cut-over lives at the ALB and in DNS rather than inside the application. That keeps the release mechanism independent of what each tier runs, which is what made it practical to apply the same automation to all 5 tiers. It also means the rollback path is exercised on every release, so it is not a procedure anyone has to remember under pressure.

Why schedules as code

Archival, cleanup and push-notification jobs are easy to forget until they stop running. Putting all 7 on EventBridge makes them part of the platform definition: they can be reviewed, deployed per environment and reasoned about like any other resource.

Outcome

  • A multi-tier AWS platform defined in Terraform, from VPC to database replicas to certificates.
  • A QA/UAT/Prod pipeline on CodePipeline with Slack release notifications.
  • Zero-downtime blue/green releases across 5 service tiers with the same Boto3 cut-over automation.
  • 7 EventBridge-scheduled Lambda jobs handling archival, cleanup and push notifications.
  • A Fivetran to Redshift pipeline with private QuickSight connectivity.
  • 39 SSH keys moved into 1Password and ClamAV scanning in place.

What I’d do next

  • Retire SSH where possible. With keys centralised, the next step is to reduce how many are needed at all, for example by moving interactive access to AWS Systems Manager Session Manager.
  • Automate the cut-over decision. Tie the blue/green switch to health checks and error-rate alarms so a bad release rolls back without a human in the loop.
  • Monitor the scheduled jobs as a set. A single view of all 7 EventBridge jobs, with alerts on missed or failed runs, would catch silent failures early.

— Rakshith S P

Open a ticket

Have a platform to build or an AI system to ship? Let’s talk.

Platform engineering leadership, AI platform and forward-deployed engineering roles.

Open a ticket +91 90354 00153
esc
↑↓ navigate ↵ opentry whoami or sudo hire rakshith