Skip to content

vizeit/GraphQLServer-Container-AWS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL Server - Container - AWS

Boilerplate Serverless Container implementation of GraphQL server in Python using AWS ECS and AWS Fargate

Features

  • Containerized
  • Infrastructure as code
  • Schema-first approach
  • Implemented in Python
  • Serverless
  • Hosting on AWS
  • Modular
  • Test-driven Development

Quickstart

Prerequisites

Steps

  1. Clone the repo,
git clone https://github.com/vizeit/GraphQLServer-Container-AWS.git
  1. Create a virtual environment
$ python3 -m venv .venv
  1. After the init process completes and the virtual environement is created, you can use the following step to activate it
$ source .venv/bin/activate
  1. Once the virtual environment is activated, you can install the required dependencies
$ pip install -r requirements.txt -r ./GraphQLAPI/requirements.txt
  1. Run unit tests for GraphQL API and AWS CDK
pytest
  1. At this point you can synthesize the CloudFormation template for this code.
$ cdk synth
  1. After successful synthesize, bootstrap the stack
cdk bootstrap
  1. Deploy the stack to your AWS account
cdk deploy
  1. Once the deployment is complete, copy LoadBalancerDNS and launch it in a browser to load GraphQL playground