Diagram 4 of 12

Dynamic site with ALB, ECS and RDS

A site with server-side logic. CloudFront splits the traffic: dynamic requests go to an Application Load Balancer, which distributes them to ECS Fargate containers inside a VPC, while static files come from S3.

Route 53CloudFrontACMApplication Load BalancerECS FargateRDSS3VPC

Diagram

Diagram 4: dynamic site with ALB, ECS Fargate and RDS in a VPCAWS CloudVPCUsersR53Amazon Route 53DNSCFAmazon CloudFrontCDN + HTTPSALBElastic LoadBalancer (ALB)ECSAmazon ECS(Fargate)RDSAmazon RDS(database)S3Amazon S3(static assets)1234561. The user resolves the domain with Amazon Route 53.2. Route 53 points to CloudFront, which uses an ACM certificate.3. CloudFront sends dynamic requests to the Application Load Balancer.4. The ALB distributes traffic to ECS (Fargate) tasks in private subnets.5. The tasks query and store data in Amazon RDS.6. Static files (CSS, JS, images) are served from Amazon S3.

Comments

Information flow

  1. Amazon Route 53

    The user resolves the domain with Route 53.

  2. Amazon CloudFront

    CloudFront receives the request over HTTPS with the ACM certificate and picks the origin based on the behavior.

  3. Application Load Balancer

    Dynamic requests reach the ALB, which only sends traffic to healthy targets.

  4. Amazon ECS (Fargate)

    The ALB distributes traffic to ECS tasks in private subnets.

  5. Amazon RDS

    The tasks read and write data in Amazon RDS.

  6. Amazon S3

    CSS, JS and images are served from S3 through CloudFront.