Day 03 Day 3

Day 3

Day 3

~1 hour Intermediate Hands-on Precision AI Academy

Today's Objective

Deploy a containerized web app to AWS App Runner from an ECR image or GitHub repo with auto-scaling and HTTPS out of the box.

AWS App Runner

App Runner is the easiest way to deploy containerized apps on AWS. You give it a container image (from ECR) or a source code repo (from GitHub), and it handles provisioning, load balancing, auto-scaling, TLS, and health checks. No ECS task definitions, no ALB configuration, no ASG tuning.

Push a Docker Image to ECR

terminal_-_create_ecr_repository_and_push_image.txt
TERMINAL — CREATE ECR REPOSITORY AND PUSH IMAGE
# Create repository
aws ecr create-repository --repository-name my-ai-app

# Get your account ID
ACCOUNT=$(aws sts get-caller-identity --query Account --output text)
REGION=us-east-1
REPO=$ACCOUNT.dkr.ecr.$REGION.amazonaws.com/my-ai-app

# Authenticate Docker to ECR
aws ecr get-login-password | docker login --username AWS --password-stdin $REPO

# Build and push
docker build -t my-ai-app .
docker tag my-ai-app:latest $REPO:latest
docker push $REPO:latest

Create an App Runner Service

apprunner.json_-_service_configuration.txt
APPRUNNER.JSON — SERVICE CONFIGURATION
{
  "ServiceName": "my-ai-app",
  "SourceConfiguration": {
    "ImageRepository": {
      "ImageIdentifier": "123456789.dkr.ecr.us-east-1.amazonaws.com/my-ai-app:latest",
      "ImageRepositoryType": "ECR",
      "ImageConfiguration": {
        "Port": "3000",
        "RuntimeEnvironmentVariables": {
          "NODE_ENV": "production",
          "ANTHROPIC_API_KEY": "{{resolve:secretsmanager:prod/anthropic-key}}"
        }
      }
    },
    "AutoDeploymentsEnabled": true
  },
  "InstanceConfiguration": {
    "Cpu": "1 vCPU",
    "Memory": "2 GB"
  },
  "HealthCheckConfiguration": {
    "Protocol": "HTTP",
    "Path": "/health",
    "Interval": 10,
    "Timeout": 5,
    "HealthyThreshold": 2,
    "UnhealthyThreshold": 3
  }
}
terminal_-_deploy.txt
TERMINAL — DEPLOY
aws apprunner create-service --cli-input-json file://apprunner.json

# Check status
aws apprunner list-services

# Get service URL
aws apprunner describe-service   --service-arn arn:aws:apprunner:us-east-1:123456:service/my-ai-app/abc   --query 'Service.ServiceUrl' --output text
Auto-scaling: App Runner scales to zero when there's no traffic. Cold starts take ~2-3 seconds. For low-latency requirements, set a minimum of 1 instance.

Add a Health Check Endpoint

node.js_-_/health_endpoint.txt
NODE.JS — /HEALTH ENDPOINT
app.get('/health', (req, res) => {
  res.json({
    status: 'ok',
    timestamp: new Date().toISOString(),
    version: process.env.npm_package_version
  });
});
Day 3 Exercise
  1. Create an ECR repository and push your Docker image
  2. Create an IAM role for App Runner with ECR pull permissions
  3. Create an App Runner service using the console or CLI
  4. Add a /health endpoint to your app if you don't have one
  5. Wait for the service to deploy and test the live URL

What's Next

The foundations from today carry directly into Day 4. In the next session the focus shifts to Day 4 — building directly on everything covered here.

Supporting Videos & Reading

Go deeper with these external references.

Day 3 Checkpoint

Before moving on, verify you can answer these without looking:

Live Bootcamp

Learn this in person — 2 days, 5 cities

Thu–Fri sessions in Denver, Los Angeles, New York, Chicago, and Dallas. $1,490 per seat. June–October 2026.

Reserve Your Seat →
Continue To Day 4
Day 4: RDS — Managed Postgres in Production