niklas-palm

S3 Multi Site Hosting — DevOps skill for Claude Code

DevOps community

Host unlimitied sites in a single S3 bucket, and deploy using your favorite AI coding assistant.

How to install S3 Multi Site Hosting

This entry records only its repository, not the path inside it, so there is no exact command to give. Open niklas-palm/s3-multi-site-hosting and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What S3 Multi Site Hosting does

Host unlimitied sites in a single S3 bucket, and deploy using your favorite AI coding assistant.

Alternatives in DevOps

  • Appwrite — Appwrite® - complete cloud infrastructure for your web, mobile and AI apps 57.5k ★
  • Claudebox — A Claude Code Docker Development Environment for running Claude AI's coding assistant in a fully containerized 964 ★
  • Skill — Web extraction engine with antibot bypass 549 ★

README

S3 Multi-Site Hosting

Host unlimited static websites from a single S3 bucket with automatic subdomain routing.

myapp.yourdomain.com  ──┐
blog.yourdomain.com   ──┼──▶  CloudFront  ──▶  S3 Bucket
docs.yourdomain.com   ──┘                      ├── myapp/
                                               ├── blog/
                                               └── docs/

Upload files to `s3://bucket/myapp/` and `https://myapp.yourdomain.com` works automatically.

**Live Demo:** [s3demo.enpalm.se](https://s3demo.enpalm.se) — built and deployed using Claude Code with the included AI skill.

Features

  • Wildcard subdomains — any *.yourdomain.com routes to matching S3 prefix
  • Zero-config SSL — wildcard certificate created automatically
  • Global CDN — CloudFront with HTTP/2, HTTP/3, IPv6
  • Aggressive caching — 7-day default TTL with Gzip + Brotli compression
  • Security headers — HSTS, X-Frame-Options, XSS protection

Prerequisites

  • AWS account with CDK bootstrapped in us-east-1
  • Route53 hosted zone for your domain

Quick Start

1. Configure

cp .env.example .env
Variable Description
DOMAIN_NAME Your domain (e.g., example.com)
HOSTED_ZONE_ID Route53 hosted zone ID

2. Deploy Infrastructure

npm install
npx cdk deploy

First deployment takes ~5 minutes (certificate validation).

3. Note Your Outputs

After deployment, save these values:

aws cloudformation describe-stacks \
  --stack-name S3MultiSiteHostingStack \
  --query "Stacks[0].Outputs" \
  --output table \
  --region us-east-1

You'll need `BucketName` and `DistributionId` for deployments.


Deploying Sites

Manual Deployment

# Build your project
npm run build

# Upload to S3 (replace  and )
aws s3 sync ./dist s3://// --delete --region us-east-1

# Invalida