A AWS cloud project to automatically add commits to a repo file at set interval using Serverless Framework.
- Specify repository and file to add commits.
- Specify information to commit to file.
- Set interval of commits.
- AWS Cloud, popular, well documented and affordable. Alternatives: Azure, Google Cloud.
- Serverless Framework, support micorservices, Infrastructure as Code IaC, and popular. Alternatives: CloudFormation
- Node.js with TypeScript, versatile, and strongly typed. Alternatives: Python, Go.
CloudWatch Events, AWS Lambda and AWS GateWay, Github API.
Ubuntu 20.04, Visual Studio Code, Github.
- Clone the project locally.
- Set up an AWS acoount. and create a user with programmatic access note access credentials.
- Create a Github access token.
- Edit project configuration in src/config/config.ts for repository details and schedule interval.
- Install node locally and AWS CLI.
- Install Serverless Framework.
# Install serverless framework using node.js
npm install -g serverless
# Create a serverles project.
sls create --template aws-nodejs-typescript --path .
# Configure serveless to use credentials created in step 1.
sls config credentials --provider aws --key <ACCESS_KEY> --secret <ACCESS_SECREAT> --profile <PROFILE_NAME>
# Export Github access token.
export GITHUB_TOKEN="<ACCESS_TOKEN>"
# Deploy the application.
sls deploy
The project will run automatically as scheduled. If you want to run the app, make an API call to the endpoints provide after deploying the project.
This project was done by SE. Moses Mwangi. Feel free to get intouch with me;
π± WhatsApp +254115227963
π§ Email moses.soft.eng@gmail.com
π± LinkedIn MosesSoftEng