We'll deploy Power Snapshot NG — a tiny web service that fetches official Nigeria electricity indicators from the World Bank Open Data API and displays them in the browser.
# Power Snapshot NG — ECS Express Mode
A minimal single-container web app for learning **Amazon ECS Express Mode**, focused on **Nigeria electricity data**.
It serves a small UI and two API routes from one Node.js process on **port 80**:
| Route | Purpose |
|-------|---------|
| `/` | Page showing Nigeria electricity indicators |
| `/api/energy` | JSON from the World Bank Open Data API |
| `/api/health` | Health check for the ALB (returns HTTP 200) |
> **Note on data:** The UK has a free live grid carbon API. Nigeria does not publish an equivalent open real-time feed — so this app uses the latest official World Bank statistics (access %, consumption per capita, renewable share). Same deployment story, honest data sourcing.
> **As of mid-2026:** ECS Express Mode is available in all regions where ECS and Fargate are supported. Console labels may shift slightly — match what you see in AWS.
---
## What you'll build
**[Screenshot: browser at your auto-generated `https:// .ecs. .on.aws` URL, showing Power Snapshot NG with Nigeria flag and electricity access %]**
A tiny web service that returns a real slice of Nigeria energy data — electricity access, consumption, and renewable share — fetched from a public API and displayed in the browser. Deliberately simple so nothing distracts from the deployment, but more interesting than "hello world."
If you'd rather ship your own image, every step below still applies.
---
## Prerequisites
- An **AWS account** with permissions for ECS, ECR, IAM, and CloudWatch
- **AWS CLI v2** installed and configured (`aws configure`)
- **Docker Desktop** installed and running
- You'll push a container image to **Amazon ECR** (Step 2)
---
## Step 1 — Build your container image
All commands below run from this folder (`express-mode/`).
### 1.1 Build
```powershell
docker build -t power-snapshot-ng .
```
**What the Dockerfile does (line by line):**
| Line | Meaning |
|------|---------|
| `FROM node:20-alpine` | Small Linux base wit …