Boilerplate Serverless Container implementation of GraphQL server in Python using AWS ECS and AWS Fargate
- Containerized
- Infrastructure as code
- Schema-first approach
- Implemented in Python
- Serverless
- Hosting on AWS
- Modular
- Test-driven Development
- Clone the repo,
git clone https://github.com/vizeit/GraphQLServer-Container-AWS.git
- Create a virtual environment
$ python3 -m venv .venv
- After the init process completes and the virtual environement is created, you can use the following step to activate it
$ source .venv/bin/activate
- Once the virtual environment is activated, you can install the required dependencies
$ pip install -r requirements.txt -r ./GraphQLAPI/requirements.txt
- Run unit tests for GraphQL API and AWS CDK
pytest
- At this point you can synthesize the CloudFormation template for this code.
$ cdk synth
- After successful synthesize, bootstrap the stack
cdk bootstrap
- Deploy the stack to your AWS account
cdk deploy
- Once the deployment is complete, copy LoadBalancerDNS and launch it in a browser to load GraphQL playground