3

AWS Deployment Guide

Step-by-step instructions for deploying AEGIS Platform to AWS

Prerequisites
1
AWS Account - Sign up at aws.amazon.com
2
Domain Name - Register or have a domain ready (e.g., sentinel-hub.com)
3
AWS CLI Installed - Download from AWS CLI
Option 1: AWS Amplify (Recommended - Easiest)
Step 1: Build the App Locally
npm run build

This creates a build/ folder with static files

Step 2: Go to AWS Amplify Console
  1. Log into AWS Console → Search "Amplify"
  2. Click "New app" → "Host web app"
  3. Select "Deploy without Git provider"
Step 3: Upload Build Folder
  1. Zip your build/ folder
  2. Upload the zip file to Amplify
  3. Set App name: "AEGIS-Platform"
  4. Environment name: "production"
Step 4: Configure Environment Variables
REACT_APP_SUPABASE_URL=your_supabase_url
REACT_APP_SUPABASE_ANON_KEY=your_anon_key
REACT_APP_API_URL=https://sentinel-hub-gcti-dtm.base44.app
Step 5: Add Custom Domain
  1. In Amplify → "Domain management"
  2. Click "Add domain"
  3. Enter your domain (e.g., sentinel-hub.com)
  4. Follow DNS configuration steps
  5. SSL certificate is automatically provisioned
✅ Done!

Your app will be live at your custom domain with HTTPS

Option 2: EC2 + Nginx (More Control)
Step 1: Launch EC2 Instance
  1. Go to EC2 Dashboard → Launch Instance
  2. Choose Ubuntu 22.04 LTS
  3. Instance type: t3.small or larger
  4. Create new key pair (download .pem file)
  5. Security group: Allow ports 22 (SSH), 80 (HTTP), 443 (HTTPS)
  6. Launch instance
Step 2: Connect to EC2
chmod 400 your-key.pem
ssh -i your-key.pem ubuntu@your-ec2-ip
Step 3: Install Dependencies
sudo apt update
sudo apt install -y nginx nodejs npm certbot python3-certbot-nginx
sudo npm install -g pm2
Step 4: Upload Build Files
# From your local machine:
scp -i your-key.pem -r build/* ubuntu@your-ec2-ip:/home/ubuntu/app/
Step 5: Configure Nginx
sudo nano /etc/nginx/sites-available/aegis # Paste this config: server { listen 80; server_name your-domain.com; root /home/ubuntu/app; index index.html; location / { try_files $uri $uri/ /index.html; } location /api { proxy_pass https://sentinel-hub-gcti-dtm.base44.app; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } } # Enable site: sudo ln -s /etc/nginx/sites-available/aegis /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl restart nginx
Step 6: Setup SSL Certificate
sudo certbot --nginx -d your-domain.com

Follow prompts to auto-configure HTTPS

✅ Done!

Your app is now live with HTTPS on EC2

DNS Configuration (Route 53)
Step 1: Create Hosted Zone
  1. Go to Route 53 → Hosted zones
  2. Click "Create hosted zone"
  3. Enter your domain name
  4. Note the nameservers (NS records)
Step 2: Update Domain Registrar

Go to your domain registrar (GoDaddy, Namecheap, etc.) and update nameservers to AWS nameservers

Step 3: Create A Record
  1. In Route 53 hosted zone → Create record
  2. Record type: A
  3. Value: Your EC2 IP or Amplify domain
  4. Save
🔑 Required Environment Variables
REACT_APP_SUPABASE_URL=https://your-project.supabase.co
REACT_APP_SUPABASE_ANON_KEY=eyJhbGc...
REACT_APP_API_URL=https://sentinel-hub-gcti-dtm.base44.app

⚠️ Never commit these to version control! Use AWS Secrets Manager or Systems Manager Parameter Store

📊 Post-Deployment Monitoring
• CloudWatch: Monitor logs and metrics
• AWS WAF: Enable for DDoS protection
• CloudFront CDN: Add for faster global delivery
• Backup: Enable automated snapshots (EC2) or use Git (Amplify)