prisma-aws-cloudformation
prisma-aws-cloudformation copied to clipboard
Web api server along with Prisma and Database
Most people use a web api server like Apollo Server or Graphql yoga etc in front of their Prisma servers in real world applications. I'm opening this issue to discuss and keep track of Cfn template with the whole stack
Overall architecture I'm proposing, Network:
- 1 VPC
- 2 Subnets (1 Private and 1 Public) in each Availability Zone. (We'll start with 2 availability zones)
Load Balancing:
- 1 Internet-facing Application Load Balancer for Web Api accepting only HTTPS connections and sticky sessions enabled
- 1 Internal Application Load Balancer for Prisma accepting HTTP and sticky sessions enabled with ingress from Web Api server SG only
Build and running environment:
- 1 ECS Cluster each for Web Api and Prisma running on Fargate
- RDS for database
Additional measures:
- Secret Manager integration for managing secrets in environment variables
- Logs for Web Api, Prisma and Database services
- Direct Connect / VPN for handling management api operations on Prisma (since it is isolated from the internet)
Let me know your thoughts and if anything else you need. I'll open a PR for this