This CDK stack deploys a real-time GraphQL API built with AWS AppSync, Amazon DynamoDB, and AWS Lambda. We use CDK to create a CodePipeline that will Continously Deploy our changes to the target environments.
To deploy this project, follow these steps.
-
Fork this project to your GitHub Repo.
-
Clone the project
git clone https://github.com/askulkarni2/cdk-graphql-backend.git
- Change into the directory and install dependencies
cd cdk-graphql-backend
npm install
- Create
GITHUB_TOKEN
as a AWS Secrets Manager secret.
aws secretsmanager create-secret --name GITHUB_TOKEN \
--description "Github Token" \
--secret-string "$GITHUB_TOKEN"
- Run the build
npm run build
- Bootstrap CDK using the
CDK_NEW_BOOTSTRAP
flag.
env CDK_NEW_BOOTSTRAP=1 cdk bootstrap \
--cloudformation-execution-policies arn:aws:iam::aws:policy/AdministratorAccess \
aws://212687814973/us-west-2
- Deploy the pipeline Stack
cdk deploy --parameters GitHubOrg=askulkarni2