This project is a Typescript CDK implementation of Adrian Cantrill's aws-serverless-pet-cuddle-o-tron. If you are new to learning AWS, I cannot recommend his Solution Architect Associate course enough.
The purpose of this repo is to codify the skills that I've learned from the course, learn CDK, and serve as a template for similar architectures.
The cdk.json
file tells the CDK Toolkit how to execute the app.
The architecture of the project will follow the architecture of Adrian's lesson.
- Install CDK and run
cdk bootstrap
to setup your cdk environment if you haven't already. - Rename
.env.example
to.env
to enable dotenv environment variables - Update environment variables in
.env
file for your configuration. - Run
cdk synth
to generate the CloudFormation files incdk.out
directory. Inspect files created. - Run
cdk deploy
to deploy changes to your AWS environment. - Log into the AWS console and view the created CuddleOTron stack in the CloudFormation tab.
- Once deployed, go to the S3 console to open the Index.html file in your browser. Fill out the form using the SES_VERIFIED_RECEIVER_EMAIL you configured in the
.env
file. - Watch the process run in the Step Functions tab. Validate if theres any errors.
- Check your RECEIVER email address. You should have an email. If its not there, check your spam folder.
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testsnpm run test-coverage
perform the jest unit tests with code coverage reportcdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template
I am using the project as a testing ground for good code hygiene practices as I intend to use this as a basis for future AWS projects.
- Running CDK using Typescript
- Automated testing using Jest and the CDK Template framework. Aiming for 75% code coverage.
- Automated Code Linting with Prettier via git pre-commit hook.
- GitHub action for CI.
- Write integration tests for each stage of the pipeline.
- Refactor Email Reminder Construct file to seperate files.
- Add CD to GitHub Action.
- Migrate Lambda code from Python to Typescript for consistency. Include unit tests.
- Add code generators for new initializing new constructs, s3, and lambdas. (I like hygen)
- Templatize this whole codebase for use in future projects.