{"id":48833525,"url":"https://github.com/pelotech/amazon-edge-demo","last_synced_at":"2026-04-14T22:01:30.172Z","repository":{"id":351128176,"uuid":"1202934110","full_name":"pelotech/amazon-edge-demo","owner":"pelotech","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-13T17:21:39.000Z","size":12211,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-13T19:18:26.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pelotech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-06T14:52:57.000Z","updated_at":"2026-04-13T17:21:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pelotech/amazon-edge-demo","commit_stats":null,"previous_names":["pelotech/amazon-edge-demo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pelotech/amazon-edge-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelotech%2Famazon-edge-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelotech%2Famazon-edge-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelotech%2Famazon-edge-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelotech%2Famazon-edge-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pelotech","download_url":"https://codeload.github.com/pelotech/amazon-edge-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pelotech%2Famazon-edge-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31817128,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-14T22:01:27.723Z","updated_at":"2026-04-14T22:01:30.138Z","avatar_url":"https://github.com/pelotech.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# amazon-edge-demo\n\nDemo application that converts and serves media files via containerized nginx. JPEG images are converted to WebP, AVI videos are converted to MP4. Both are served through a dark-themed HTML gallery with links to the original files.\n\n## About\n\nThis project is a demonstration application that highlights the differences between several AWS compute deployment models. It uses a simple media gallery — converting and serving images and videos through a web browser — as a practical, visual way to show containers running across Amazon ECS with EC2 and Fargate capacity providers, as well as Amazon EKS with EC2-backed node groups and Fargate profiles.\n\nChoosing the right compute model is one of the most consequential infrastructure decisions an organization can make, affecting cost, operational overhead, and scalability. Rather than comparing these options in the abstract, this demo puts them side by side with identical workloads so that the differences in deployment, networking, and access patterns become tangible. Each container operates independently with no network communication between them, which is intentional — these types of deployments don't require inter-container coordination, and keeping them isolated is simply easier to operate.\n\nThe demo is packaged as two lightweight containers — one for images, one for videos — each built on nginx and responsible for converting source media files at startup before serving them through a dark-themed gallery page. Infrastructure is provisioned with Terraform, which stands up a VPC, EKS cluster, and ECS cluster in a single apply. Kubernetes deployments are managed with Kustomize overlays that target either EC2 or Fargate environments. A local testing script is included so the full experience can be previewed on a laptop with nothing more than Docker installed.\n\n## Containers\n\n| Image | Description | Registry |\n|-------|-------------|----------|\n| `amazon-edge-demo-images` | Converts JPEGs to WebP at startup, serves image gallery | `ghcr.io/pelotech/amazon-edge-demo-images` |\n| `amazon-edge-demo-videos` | Converts AVIs to MP4 at startup, serves video gallery | `ghcr.io/pelotech/amazon-edge-demo-videos` |\n\nBoth containers expose port 80 and generate an `index.html` gallery page with links to converted and original files.\n\n## Architecture\n\nSee [docs/architecture.md](docs/architecture.md) for the full infrastructure diagram, subnet placement details, and demo access credentials.\n\n### ECS (AWS)\n\n- **3 images containers** on EC2 capacity provider\n- **1 video container** on Fargate capacity provider\n- All services accessible on **port 80** via public IP\n\n### EKS (AWS)\n\n- **3 images containers** + **1 video container** on EC2-backed managed node groups (t3a.small)\n  - Images pods use pod anti-affinity to spread across different nodes\n  - Accessible via NodePort on the node's public IP:\n    - Images: `http://\u003cnode-ip\u003e:30080`\n    - Videos: `http://\u003cnode-ip\u003e:30081`\n- **1 images container** + **1 video container** on Fargate (namespace: `fargate`)\n  - Fargate pods require **`kubectl port-forward`** to access:\n    ```bash\n    kubectl port-forward -n fargate svc/amazon-edge-images 8080:80\n    kubectl port-forward -n fargate svc/amazon-edge-videos 8081:80\n    ```\n\n## Local Testing\n\n```bash\n./test-local.sh\n```\n\nBuilds both containers and runs them locally:\n- Images gallery: http://localhost:8080\n- Videos gallery: http://localhost:8081\n\nStop with: `docker rm -f amazon-edge-images amazon-edge-videos`\n\n## Publishing\n\nImages are published to GHCR via manual workflow dispatch:\n\n```bash\ngh workflow run publish.yml\n```\n\nTags: `latest` + `sha-\u003cshort commit hash\u003e`\n\n## Project Structure\n\n```\n.\n├── Dockerfile.images          # nginx + libwebp-tools\n├── Dockerfile.videos          # nginx + ffmpeg\n├── entrypoint-images.sh       # JPEG -\u003e WebP conversion + gallery generation\n├── entrypoint-videos.sh       # AVI -\u003e MP4 conversion + gallery generation\n├── nginx.conf                 # Static file serving + /originals/ autoindex\n├── test-local.sh              # Local build and run script\n├── images/                    # Source JPEG files (10 samples)\n├── videos/                    # Source AVI files (5 samples)\n├── .github/workflows/\n│   └── publish.yml            # Manual GHCR publish workflow\n├── kustomize/\n│   ├── ec2/                   # EKS EC2 node group deployments\n│   └── fargate/               # EKS Fargate namespace deployments\n└── terraform/\n    └── main.tf                # VPC, EKS, ECS infrastructure\n```\n\n## Deploying\n\n### Kustomize (EKS)\n\n```bash\n# EC2 node group (3 images + 1 video)\nkubectl apply -k kustomize/ec2/\n\n# Fargate (1 images + 1 video in fargate namespace)\nkubectl apply -k kustomize/fargate/\n```\n\n### Terraform (ECS + EKS)\n\n```bash\ncd terraform\nterraform init\nterraform apply\n```\n\nProvisions VPC, EKS cluster with EC2 nodes and Fargate profile, and ECS cluster with EC2 capacity provider.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelotech%2Famazon-edge-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpelotech%2Famazon-edge-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelotech%2Famazon-edge-demo/lists"}