Zap is whyphi's temporary (maybe permanent) serverless API solution.
Zap is created using:
- AWS Chalice: Framework that abstracts Python code as serverless functions
- AWS Lambda
- AWS API Gateway
- AWS DynamoDB: AWS's NoSQL Database
- AWS S3: Handles data for application
- AWS IAM: Managing permissions and policies within AWS services
Ensure that you have AWS CLI installed. Then, set the necessary AWS configuration within your system using:
aws configure
Within Zap, Python dependences are managed using pipenv
. Ensure you have pipenv
installed within your machine.
To turn on the virtual environment using pipenv
:
pipenv shell
To install necessary dependencies within pipenv
:
pipenv shell
To install any additional dependenceis within pipenv
:
pipenv install {dependency name}
To enable local server for Chalice:
chalice local
PRs should be made in the following order:
Personal PR -> `dev/*` -> `staging` -> `prod`
This work exists to minimize potential errors being pushed to production. All deployments will happen when PRs are pushed to dev
, staging
, and prod
automatically as GitHub Actions has been already setup.
To find dev
and prod
API endpoints, access AWS Lambda and find the respective API Gateway link.