This repository contains a boilerplate to kickstart your serverless journey with AWS CDK and AppSync.
- AWS CDK-based infrastructure setup
- AWS AppSync configuration for GraphQL endpoints
- Serverless functions with AWS Lambda, and AWS DynamoDB
- Easy deployment scripts
-
Clone the repository:
git clone https://github.com/mikaeelkhalid/aws-cdk-appsync-serverless-boilerplate.git cd aws-cdk-appsync-serverless-boilerplate
-
Install dependencies:
npm install
-
Deploy to AWS:
First, you need to bootstrap the AWS environment to use AWS CDK.
cdk bootstrap
Then, deploy the stack.
cdk deploy
After deploying, you can use the following queries and mutations in the AWS AppSync console:
query listNotes {
listNotes {
id
name
completed
}
}
mutation createNote {
createNote(note: { id: "01", name: "Note Name", completed: false }) {
id
name
completed
}
}
Feel free to adjust or refine as needed!