Hausra and Aurora Serverless using AWS CDK

This is a project that deploys Hasura along with Aurora Serverless using AWS CDK.

It creates:

  • the cluster and the database in the default VPC.
  • an ALB over the hasura instance(s)
  • a bunch of private VPC endpoints.

It doesn't create a NAT Gateway to reduce overall cost.

See the images/hasura-graphql-engine/ for the Dockerfile and custom run script.

The main stack is in lib/hasura-cdk-stack.ts

Inspiration

This implementation takes inspiration from the work of Gordon Johnson (@elgordino) and his Lineup Ninja Hasura CDK presentation.

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template