In this presentation I will demonstrate how you could create a simple scalable GraphQL API using AWS Lambda and GraphQL library with Neptune Graph database. I will also take you through deployment process using AWS CDK to deploy our lambda function. In order to trigger the lambda we will also need to create an AWS API Gateway to trigger the deployed lambda.
When client sends an HTTP(s) request to public endpoint of AWS API Gateway; it will trigger an AWS State Machine which has a definition of Lambda execution. We could have Authorizer Lambda to be triggered when initial lambda in triggered. Please look at Architecture Diagram for Step Functions Workflow.
Please follow steps below to deploy this project on AWS. Two main prerequisites to deploy this application are:
- to have an AWS account with Administrator Privileges
- to have a Docker Desktop installed and running on your machine
Please ensure you have the following environment variables set before running a command described in Step II.
AWS_KEY
Your AWS Public Key, could be obtained from Security Credentials pageAWS_SECRET
This will be your AWS Secret key, could be obtained from Security Credentials pageCDK_DEFAULT_ACCOUNT
Your AWS Account NumberCDK_DEFAULT_REGION
Preferred region to deploy resources
There is Makefile
located at the root of this repository; please use a command
below to build a docker image which acts as a pipeline to deploy AWS resources
using Environment variables set in Step I.
make deploy
Copyright © 2022 Syniol Limited. All Rights Reserved.