We use AWS to host different resources, the main ones being:
- RDS Postgres database: Hosts all investment data sources and various outputs.
- Secrets Manager: Keeps database and stock price API credentials accesible and safe.
- Lambda functions: Get assets ids, update prices, update news, etc. See /tba_invest_etl/lambdas and template.yaml.
- Step functions: To orchestrate (and parallelize) lambda function execution. See /statemachines.
Local development process uses on git and GitHub, and relies heavily on the Makefile at project level. File .github/workflows/main.yml shows how the Makefile is used during a push to the GitHub repository. All this in an effort for CI/CD.
- [Once] Clone GitHub repo.
- [Once] Authenticate into AWS IAM user in terminal.
- [Once] Install dependenices in your virtual or conda environment
- make install
- Update code. Make a branch.
- git pull
- git checkout -b [your_branch]
- Format, lint, and test
- make format: Standardizes the code format
- make lint: Checks for any linting errors. These will be validated again in GitHub Actions (you need 10 out of 10 to pass).
- make test: Runs tests. These have to pass in GitHub Actions. You can also use VSC to run them and importantly, to debug them if necessary.
- make pre_pr: Runs format, lint, and test.
- [Optional] Deploy new code from local. These will be ran in GitHub Actions anyways.
- make sambuild
- make samdeploy
- Commit and push. Go through pull request. Change will be accepted if validation is successful in GitHub Actions.