profile picture Anaica Grouver
2 min read Jul 25, 2020

How to deploy Hasura GraphQL Engine to AWS with ECS and Aurora Serverless

Following are the steps to build a scalable GraphQL API over Serverless Aurora PostgreSQL with the help of ECS to run the docker image which will be deployed by AWS Cloudformation.

Architecture overview


The idea is to deploy the Hasura Docker Image as a Elastic Cluster Service. This gives us ability to add compute tasks to the cluster whenever current CPU is not sufficient for serving the user requests. This behavior can be modified by changing AutoScalingTargetValue, MinContainers and MaxContainers parameters in the CloudFormation Templates. Aurora Serverless PostgreSQL is a managed service from AWS which handles on-demand scaling, this supports our scalable Hasura Compute with the database layer needed.

This launch URL, retrieves cloudformation template from AWS S3 and runs it to form the stack. On calling the URL, it calls the yaml file which consist of the instructions aws must use while creating the stack on cloudformation. You will have to fill in the details to name the database, set password and define the domain in case if you want to deploy Hasura with SSL and custom domain name.

Deploy Hasura with default DNS of Load Balancer

Deploy Hasura Engine with a auto generated DNS from Load Balancer. To access the deployed Hasura, go to EC2 dashboard on AWS and click on the created load balancer, now copy the DNS name and open it in a new tab.


Deploy Hasura with custom domain and SSL

Deploy Hasura Engine with custom domain name and SSL. Pre-requisites for this step would be to have a hosted zone setup in Route53 and SSL certificate issued from Amazon Certificate Manager.



  1. Serverless GraphQL with Hasura on AWS ECS over Aurora PostgreSQL
  2. Construct Your Own Launch Stack URL

For questions and suggestions, feel free to reach out to us on Twitter.

Application Modernization Icon

Innovate faster, and go farther with serverless-native application development. Explore limitless possibilities with AntStack's serverless solutions. Empowering your business to achieve your most audacious goals.

Build with us



Share this blog

Your Digital Journey deserves a great story.

Build one with us.

Recommended Blogs

Cookies Icon

These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information in order to improve and customize your browsing experience and for analytics and metrics about our visitors on this website.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference not to be tracked.

Build With Us