During one of our front-end projects, we came across an amazing GraphQL framework that extends an AWS Aurora database. Our local-environment tests were very successful using docker, we were excited to deploy it on the cloud.
The task was simple, we wanted to provide the maximum scalability possible without maintaining or monitoring EC2 servers. What we ended up using is AWS ECS with Fargate, and we put it behind an ALB in a private subnet across two availability zones. Connecting these to Aurora was extremely easy using Systems Manager to store our database secrets.
We set up two environments, one in staging another in production. It was all very easy to do using terraform workspaces, all it took was a couple well-placed environment variables. We love Terraform Cloud for automated deployments, so that is what we used for infrastructure CI.
Overall, the project has been a great success, the amount of work we have been able to do in the front-end has been many times larger than the output had we had to use conventional REST API’s or server-side logic.
Our plans for our next iteration are to use something like pgPool to split reads from writes and using a single endpoint we can distribute queries among Read-Replicas from the Write instance, all with minimal code or configuration.