This is intended to be a repo containing all of the official AWS Serverless architecture patterns built with CDK for developers to use.
Follow @CdkPatterns for live discussion / new pattern announcements. I plan to add a new pattern weekly so check back regularly!
Note, this is maintained by @nideveloper not AWS. For my motivation, please read this blog post
- To learn more visit the AWS getting started guide
- To do a workshop on CDK visit cdkworkshop.com
- Visit the Hey CDK "How To" series for some detailed answers
- Check out Awesome CDK for a curated list of awesome projects related to CDK
All patterns are available in Typescript and Python so pick your favourite language! Note the Typescript patterns all include unit tests but right now I have not seen a standard python testing approach
TypeScript
All Patterns (unless otherwise stated in their readme) should support the same commands so you can just run:
git clone https://github.com/cdk-patterns/serverless.git
cd {pattern-name}/typescript
npm i
- install the dependenciesnpm run build
- build the projectnpm run test
- run the unit testsnpm run deploy
- deploy the pattern into your AWS account*
* Note this requires you to be using cloud9 or have ran aws configure to setup your local credentials
Python
The CDK CLI is still installed via npm so make sure you have the latest version of node installed or the npx commands will fail. Then you can just run:
git clone https://github.com/cdk-patterns/serverless.git
cd {pattern-name}/python
python -m venv .env
- Create a virtual envsource .env/bin/activate
- Activate the virtual envpip install -r requirements.txt
- Install the dependenciesnpx cdk synth
- generate a cft from the stack to validate your setupnpx cdk deploy
- deploy the pattern into your AWS account*
* Note this requires you to be using cloud9 or have ran aws configure to setup your local credentials
Matt Coulter Patterns (@nideveloper)
These are built using https://www.npmjs.com/package/cdk-spa-deploy
Jeremy Daly Patterns (@jeremy_daly)
These patterns are from https://www.jeremydaly.com/serverless-microservice-patterns-for-aws/
James Beswick Patterns (@jbesw)
This was taken from this Blogpost
Eric Johnson Patterns (@edjgeek)
This was taken from this Tweet
Building enterprise applications using Amazon DynamoDB, AWS Lambda, and Go by Geoffroy Rollat
Found via this tweet
Introduce a fluent way to design cloud native microservices via EventStorming workshop, this is a hands-on workshop. Contains such topics: DDD, Event storming, Specification by example. Including the AWS product : Serverless Lambda , DynamoDB, Fargate, CloudWatch.
Sebastian Müller (@sbstjn, @superluminario)
Full-featured example project based on create-react-app with server-side rendering and continuous deployment.
Found via this tweet and this.
I hope for this to be something the whole cdk community contributes to so feel free to fork this repo and open up a pull request. For full details see our Contributing Guidelines