$ show aws-samples/amazon-ecs-fullstack-app-terraform
This repository contains a full-stack web application deployed on AWS ECS with a CI/CD pipeline. The frontend is a Vue.js application that retrieves product data from a backend Node.js/Express API. The backend scans a DynamoDB table and returns product information, including image URLs stored in S3. Infrastructure is provisioned via Terraform, including networking, ECS cluster/services, ECR repositories, IAM roles, CodePipeline/CodeBuild/CodeDeploy for Blue/Green deployments, autoscaling, and supporting resources (S3, DynamoDB, SNS). The architecture separates concerns with modular Terraform modules and implements production-grade practices like health checks, Swagger documentation, and stress testing.
The LLM identified 4 files worth highlighting for reuse:
Creates a production-ready VPC with public/private subnets, internet gateway, NAT gateway, and route tables across two availability zones. Parameterized for reuse with CIDR block and environment name inputs. Demonstrates solid AWS networking fundamentals without tight coupling to application specifics.
Flexible module for creating Application Load Balancers and/or target groups with configurable listeners, health checks, and routing. Supports both HTTP and HTTPS protocols. Decoupled from specific services via input variables, allowing reuse across different applications and environments.
Comprehensive IAM module that creates roles (ECS task execution, DevOps, CodeDeploy) and attaches granular policies for least-privilege access. Handles policy document generation and role attachments cleanly. Reusable for various AWS service integrations with minimal modification.
Implements AWS CodeDeploy for ECS Blue/Green deployments with traffic shifting, automated rollback on failure, and SNS notifications. Parameterized for cluster, service, load balancer, and target group abstractions. Encapsulates complex deployment patterns into a reusable, production-ready component.