๐Ÿš€ EKS to Amplify Migration Guide

Complete guide for migrating static websites from expensive EKS to cost-effective AWS Amplify

๐Ÿ’ฐ Cost Analysis

Your current EKS setup is significantly over-engineered for static website hosting. Here's the cost breakdown:

โŒ Current EKS Setup

$123-143

per month

  • EKS Control Plane: $73/month
  • Fargate Pods: $30-50/month
  • Application Load Balancer: $20/month
  • Data Transfer: $5-10/month

โœ… AWS Amplify

$1-5

per month

  • Static Hosting: $1-3/month
  • CloudFront CDN: $1-2/month
  • SSL Certificate: Free
  • Route 53: $0.50/month
๐Ÿ’ก Savings: 95% cost reduction! You'll save approximately $118-138 per month by migrating to Amplify.

๐Ÿ”„ Migration Steps

1 Extract Website Content

I've already extracted your HTML content from the Kubernetes ConfigMap and created local files.

2 Create Git Repository
# Create a new directory for your website mkdir mcp-amplify-website cd mcp-amplify-website # Initialize git repository git init git add . git commit -m "Initial commit: MCP website migration to Amplify" # Create GitHub repository and push gh repo create mcp-amplify-website --public git remote add origin https://github.com/YOUR_USERNAME/mcp-amplify-website.git git push -u origin main
3 Set Up AWS Amplify

Connect your GitHub repository to AWS Amplify for automatic deployments.

โ˜๏ธ AWS Amplify Setup

Option 1: Using AWS Console

Step-by-Step Console Setup

  1. Go to AWS Amplify Console
  2. Click "New app" โ†’ "Host web app"
  3. Select "GitHub" as source
  4. Authorize AWS Amplify to access your GitHub
  5. Select your repository and branch
  6. Configure build settings (auto-detected for static sites)
  7. Review and deploy

Option 2: Using AWS CLI

CLI-Based Setup

# Create Amplify app aws amplify create-app \ --name "mcp-website" \ --description "MCP Documentation Website" \ --repository "https://github.com/YOUR_USERNAME/mcp-amplify-website" \ --platform "WEB" \ --iam-service-role-arn "arn:aws:iam::ACCOUNT:role/amplifyconsole-backend-role" # Create branch aws amplify create-branch \ --app-id "YOUR_APP_ID" \ --branch-name "main" \ --description "Main production branch" # Start deployment aws amplify start-job \ --app-id "YOUR_APP_ID" \ --branch-name "main" \ --job-type "RELEASE"

Custom Domain Setup

Configure Your Domain

# Add custom domain to Amplify app aws amplify create-domain-association \ --app-id "YOUR_APP_ID" \ --domain-name "mcpkubernetes.cloudopsinsights.com" \ --sub-domain-settings '{ "prefix": "", "branchName": "main" }' # Update Route 53 DNS records (Amplify will provide CNAME values) aws route53 change-resource-record-sets \ --hosted-zone-id "YOUR_HOSTED_ZONE_ID" \ --change-batch file://dns-changes.json

๐Ÿงน EKS Cleanup

โš ๏ธ Important: Only proceed with cleanup after verifying your Amplify site is working correctly.

1 Delete Application Resources
# Delete the ingress (this will remove the ALB) kubectl delete ingress nginx-ingress -n fargate-demo # Delete the service kubectl delete service fargate-demo-service -n fargate-demo # Delete the deployment kubectl delete deployment fargate-demo-app -n fargate-demo # Delete ConfigMaps kubectl delete configmap mcp-html-content -n fargate-demo kubectl delete configmap nginx-config -n fargate-demo # Delete the namespace kubectl delete namespace fargate-demo
2 Remove AWS Load Balancer Controller
# Uninstall AWS Load Balancer Controller helm uninstall aws-load-balancer-controller -n kube-system # Delete the IAM service account eksctl delete iamserviceaccount \ --cluster=demo \ --namespace=kube-system \ --name=aws-load-balancer-controller
3 Delete EKS Cluster
# Delete the entire EKS cluster eksctl delete cluster --name demo --region us-east-1 # This will automatically delete: # - EKS cluster # - Fargate profiles # - Node groups # - Associated VPC and subnets # - Security groups # - IAM roles
4 Clean Up Route 53 (Optional)
# If you want to remove old DNS records aws route53 change-resource-record-sets \ --hosted-zone-id "YOUR_HOSTED_ZONE_ID" \ --change-batch '{ "Changes": [{ "Action": "DELETE", "ResourceRecordSet": { "Name": "mcpkubernetes.cloudopsinsights.com", "Type": "CNAME", "TTL": 300, "ResourceRecords": [{"Value": "OLD_ALB_DNS_NAME"}] } }] }'

๐ŸŽฏ Migration Benefits

Why This Migration Makes Sense:

  • Cost Efficiency: 95% cost reduction for static content
  • Performance: Global CDN with edge caching
  • Simplicity: No container orchestration complexity
  • Scalability: Automatic scaling for traffic spikes
  • Security: Built-in DDoS protection and WAF
  • Maintenance: Zero infrastructure maintenance
  • CI/CD: Automatic deployments from Git

๐Ÿ“Š Migration Summary

This migration guide demonstrates how to move from an over-engineered EKS solution to a cost-effective, performant AWS Amplify setup for static websites.

๐ŸŽฏ Key Achievements

  • โœ… 95% Cost Reduction: From $123-143/month to $1-5/month
  • โœ… Better Performance: Global CDN vs single region ALB
  • โœ… Zero Maintenance: Fully managed infrastructure
  • โœ… Improved Security: Built-in DDoS and WAF protection
  • โœ… Automatic Scaling: Handles any traffic volume
  • โœ… Git-based Deployments: Push to deploy workflow