Raven Messenger is a fictional serverless chat application developed as an example. It uses API Gateway, Cognito, Lambda and DynamoDB to form an extremely cost-effective backend that scales out as users grow. This project creates both a REST API and a WebSocket API which are consumed by my React Frontend which I have hosted in a seperate repository.
Built With AWS CDK
The AWS CDK (Cloud Development Kit) is an open-source development framework for generating CloudFormation templates using high level abstractions. With it you can define a lot of infrastructue using only a few lines of code. This framework doen't solve all the current problems with Infrastructure as Code. But after using this framework for awhile, I really believe it's the future of IaC.
Unfortunately, there is currently no way to simulate AWS infrastructure locally on your computer. So in order to test this code you'll need to deploy it into your own AWS account. Luckily with all these services you pay for only what you use, so the cost should be very small.
Install or update the AWS CDK CLI from npm (requires Node.js ≥ 10.3.0):
$ npm i -g aws-cdk
Ensure that your AWS Credentials File is set up properly with your AWS account.
Install NPM packages
npm install
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testsnpm run lint
runs eslint on the projectcdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template
I've implemented all the features I planned for version one of this project. As I develop new frontends, I'll add new features as I need them.
Barry McAndrews - bmcandrews@pitt.edu
Project Link: https://github.com/barrymcandrews/raven-iac