---
# System prepended metadata

title: Diagrams

---

# Diagrams


```plantuml
@startuml
!define AWSPuml https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v13.1/dist
!include AWSPuml/AWSCommon.puml

' comment out to simplify
!include AWSPuml/AWSSimplified.puml

!include AWSPuml/General/Users.puml
!include AWSPuml/Storage/SimpleStorageServiceBucketWithObjects.puml
!include AWSPuml/NetworkingContentDelivery/ElasticLoadBalancingApplicationLoadBalancer.puml
!include AWSPuml/NetworkingContentDelivery/Route53.puml
!include AWSPuml/NetworkingContentDelivery/CloudFront.puml
!include AWSPuml/Compute/EC2.puml
!include AWSPuml/Compute/EC2Instance.puml
!include AWSPuml/Containers/Fargate.puml
!include AWSPuml/Groups/AWSCloud.puml
!include AWSPuml/Groups/VPC.puml
!include AWSPuml/Groups/AvailabilityZone.puml
!include AWSPuml/Groups/PublicSubnet.puml
!include AWSPuml/Groups/PrivateSubnet.puml
!include AWSPuml/Groups/AutoScalingGroup.puml
!include AWSPuml/NetworkingContentDelivery/VPCNATGateway.puml
!include AWSPuml/NetworkingContentDelivery/VPCInternetGateway.puml
!include AWSPuml/Compute/EC2.puml
!include AWSPuml/Database/Aurora.puml
!include AWSPuml/SecurityIdentityCompliance/WAF.puml

' left to right direction

Users(users, "Users", "millions of users")

AWSCloudGroup(cloud) {

  together {
    Route53(route53, "DNS", "Route53")
    CloudFront(cloudfront, "CDN", "")
    SimpleStorageServiceBucketWithObjects(s3, "Static Resources", "")
  }

  VPCInternetGateway(internet_gateway, "Internet gateway", "")

  VPCGroup(vpc) {

      PublicSubnetGroup(public_subnet, "Public Subnets (3)") {
        together {
          WAF(waf,"Web Application Firewall", "")
          ElasticLoadBalancingApplicationLoadBalancer(public_alb, "Public ALB", "public load balancer")
        }

        VPCNATGateway(nat_gateway, "NAT gateway", "")

        waf <-> public_alb
      }

      PublicSubnetGroup(dmz_subnet, "DMZ Subnets (3)") {
        EC2(nat_gateways, "SFTP", "")
      }

      PrivateSubnetGroup(private_subnet, "Private Subnets (3)") {
        ElasticLoadBalancingApplicationLoadBalancer(private_alb, "Private ALB", "private load balancer")
        Aurora(db, "Database(s)", "")

        AutoScalingGroupGroup(containers,"Autoscaling App") {

          AvailabilityZoneGroup(az1, "Availability Zone") {
            Fargate(container_1, "app", "")
          }

          AvailabilityZoneGroup(az2, "Availability Zone") {
            Fargate(container_2, "app", "")
          }

          AvailabilityZoneGroup(az3, "Availability Zone") {
            Fargate(container_3, "app", "")
          }

        }
        private_alb -> containers
        public_alb -> containers
        containers --> db
      }

      cloudfront --> public_alb
      containers .u.> nat_gateway
  }

  users --> route53
  route53 --> cloudfront
  cloudfront -> s3

  nat_gateway .u.-> internet_gateway
  private_subnet .[hidden]u.> public_subnet

}

@enduml
```