A CDK project that notifies users about their LeetCode progress via email. Utilized Github Action to create an automated deployment pipeline
LeetCode Progress Tracker
Technologies Used: AWS S3, AWS SES, AWS Eventbridge, AWS Step Function, AWS Lambda, AWS CDK, Python, TypeScript, Requests Library, JSON
This is a sample email you will receive:

This shows the design works correctly:

Must-Dos before running the project (search for TODO in the code):
-
Create a Lambda Layer from the ZIP file in S3, which includes the requests library . This is done manually by uploading the ZIP file to a S3 bucket: requests_layer.zip

-
Find the deploy.yml at .github/workflows, you will see ${{ secrets.AWS_ACCESS_KEY_ID_GAMMA }}, ${{ secrets.AWS_SECRET_ACCESS_KEY_GAMMA }}. these secrets need to be added to the GitHub repository. Go to repository settings -> secrets and variables (left panel) -> action -> new repository secret

-
Replace with your SES-verified email and destination email. Go to AWS console, go to SES service, on the left panel, click on identities under Configuration, and create a new identity

-
Complete the TODO list note in codes. Pay attention to the account id, access key, secret access key, and region, replace them to your own information. Currently deployed to one region: us-east-2. You can uncomment the deploy.yml to deploy to more prod stages/regions
aws configureset up aws account connection -> in ChatGPT, search "how to set up aws configure" . if you don't have the AWS Access Key ID and Secret Access Key, search "AWS Access Key ID and Secret Access Key"
$ aws configure
AWS Access Key ID [None]: yourID
AWS Secret Access Key [None]: yourKey
Default region name [None]: us-east-2
Default output format [None]: json
npm run buildcompile typescript to jscdk bootstrapIf this is your first time using AWS resources, you need to run cdk bootstrap once before running cdk deploy,cdk deployThis is an optional step as you can run below git commands. deploy this stack to your default AWS account/regiongit add .git commit -m "new code"git push
aws configureset up aws account connectionnpm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testscdk bootstrapbefore running cdk deploy, you need to run cdk bootstrap once when deploying to a new regionnpx cdk deploydeploy this stack to your default AWS account/regionnpx cdk diffcompare deployed stack with current statenpx cdk synthemits the synthesized CloudFormation template
special mention: thanks to this useful API provided in https://github.com/alfaarghya/alfa-leetcode-api
© Muyun Ji. Confidential and Proprietary. All Rights Reserved.
