Deploy Metabase on AWS: ECS Fargate, RDS Postgres, and an Application Load Balancer | Workshop

Surfalytics | Fast Track to Data Career
453 views •

In this FREE Surfalytics workshop, Sergey deploys Metabase on AWS from scratch: ECS with Fargate for the container, RDS Postgres for persistent configuration, an Application Load Balancer as the public entry point, and security groups that build a tunnel from the internet down to the database. Metabase is a popular open-source BI tool. It is one of the cheapest good-quality BI options for a small company. But the real topic here is container deployment on AWS. The same pattern runs Airflow, ClickHouse, Jupyter, Prefect, Dagster, or any tool you can run in local Docker. The whole demo is done step by step in the AWS Console, not generated by AI. That is on purpose: after you click through it once, Terraform becomes easy to read. 🎯 What you'll learn ECS & FARGATE • The four ECS pieces: cluster, task definition, task, and service • Task definition = the blueprint (image, env vars, CPU/RAM, IAM roles) • Task = the running instance, with its own private and public IP • Service = the control plane that keeps your task always on and registers it with the ALB • Fargate: serverless compute, no EC2 fleet to manage • Docker Hub image vs Amazon ECR, and why ECR gives you version control NETWORKING & SECURITY • Application Load Balancer as the front door, so users never see the task IP • Why a new task gets a new IP, and how the ALB + target group hide that • Security group chain: internet → ALB (port 80) → ECS (port 3000) → RDS (port 5432) • Public vs private subnets, NAT Gateway (~$35/month), and VPC endpoints • Why RDS and the ALB both require two subnets, even for single-AZ DATABASE & CONFIGURATION • Why Metabase needs RDS Postgres: dashboards live in the app database • The built-in H2 database and why you lose everything when the task dies • Keep the Metabase app database separate from your operational database • Environment variables: MB_DB_TYPE, USER, PASS, HOST, PORT, DBNAME • CloudWatch logs from the task execution role TRADE-OFFS & COST • Port 80 only, no TLS certificate — what you give up and how to add HTTPS + Route 53 later • Single task, single-AZ Postgres, public subnet: cheap now, one click to scale later • ~$65/month for this setup, ~$100/month with NAT Gateway and private subnets • Honest conclusion: at that price, Metabase Cloud starter may be the better deal ⏱️ TIMESTAMPS 0:00 - Intro: why Metabase and why deploy it yourself 1:19 - Requirements: public access, low budget, no servers to manage, easy upgrades 2:14 - Architecture walkthrough: ECS, Fargate, RDS, ALB, ECR, CloudWatch 4:16 - Application Load Balancer as the front door 4:43 - What ECS is and what Fargate gives you 6:32 - ECS building blocks: cluster, task definition, task, service 9:01 - Why the service matters: always-on tasks and changing IP addresses 10:31 - Test in local Docker first; when to use ECR instead of Docker Hub 14:28 - Why RDS Postgres: persistent storage for dashboards (H2 is not enough) 16:31 - Why RDS and ALB need two subnets even for a single-AZ setup 18:15 - Why the load balancer, and why port 80 only 23:35 - Public vs private subnet, NAT Gateway cost, VPC endpoints 25:21 - Single-AZ database: cost vs redundancy 26:17 - Trade-offs summary and what a production version looks like 29:20 - Create the VPC with the managed wizard (subnets, route tables, IGW) 32:37 - Create the IAM task execution role 35:28 - Security groups: internet → ALB → ECS → Postgres 42:38 - Create the RDS Postgres instance (free tier, subnet group, DB name) 43:42 - Metabase sizing: CPU and RAM for ~20 concurrent users 49:43 - Create the ECS cluster and the task definition 52:50 - Container port 3000, environment variables, CloudWatch logs 56:34 - Create the Application Load Balancer and target group 1:00:08 - Create the ECS service and attach it to the load balancer 1:05:21 - Cost check: ~$65-100/month self-hosted vs Metabase Cloud 1:07:10 - Wrap-up: ECS as the engine for any open-source tool 📌 Resources mentioned • Metabase (open source BI) + Metabase Cloud pricing • Amazon ECS + AWS Fargate • Amazon ECR (container registry) • Amazon RDS for PostgreSQL • Elastic Load Balancing (Application Load Balancer) • Amazon VPC, NAT Gateway, VPC endpoints • AWS IAM, AWS Secrets Manager, Amazon CloudWatch • Amazon Route 53 + AWS Certificate Manager (for HTTPS, next step) • Terraform (both console and Terraform steps are in the Surfalytics GitHub repo) This is part of the FREE Data Engineering content from Surfalytics. Like, subscribe, and share if you want more practical workshops on cloud infrastructure, BI tools, and data platforms. #DataEngineering #AWS #ECS #Fargate #Metabase #BusinessIntelligence #Docker #Containers #RDS #PostgreSQL #LoadBalancer #CloudComputing #DevOps #Surfalytics #FreeCourse

Keyboard shortcuts

On. Switch them off if they collide with your assistive tools; ? still opens this sheet.

Go to

Press g then the letter.

  • gh Latest
  • gs Sources
  • gm Media
  • gv Videos
  • gp Podcasts
  • gc Calendar
  • gd Decoder
  • gz Dataviz
  • ga Datasets
  • gb Blog
  • gk Markets
  • gj Careers
  • gn Prompt Notebook

On this page

  • / Focus search, where there is one
  • t Back to top
  • ? This list
  • Esc Close