Complete documentation available on github pages
The Fintech Artificial Inteligence Consortium LAB is an UNSW vistual lab.
This is a template for starting new project on AWS.
The state of the terraform configuration is saved to an S3 bucket.
It is saved in the bucket terraform-backend-faic-infra under a folder named after your project. the tfstate file is suffixed with the environement. If you change the backend configuration, you might destroy your infrastructure...
Please, learn how to use terraform and how AWS works before doing anything...
-
Configure your AWS credentials, refer to provider documentation, do not hard code your secret token. You will need IAM permission to deploy services and access the terraform-backend-faic-infra bucket.
-
Modify the infrastructure definition.
-
run
pipenv install
-
run
make
in the console. Double check the terraform plan before accepting the changes.3.1 Depending on your os, you might need to run
pipenv shell
-
Check the outputs.json file to find API url and API keys.
make zip_lambdas
: compress lambdas codemake deploy
: deploy stackmake output
: write outputs to outputs.jsonmake destroy
: destroy the stack (bad idea)
DynamoDB: src.dynamo
you will find a preconfigured DynamoDB table for your project.
DynamoWebsocket: src.streaming
you can set isstrem=True
when creating the DynamoDB object table. A websocket API that stream DynamoDB insertion will be created.
Timestream: src.timestream
preconfigured timestream table for timestaries
RESTApi: src.api
create a rest API for your project table. The sample codes are made to work with dynamoDB, you must update them dependings on your needs.
Usage: create the api then call api.add_endpoint to add lambda proxy endpoints. Call api.finalize to finalize the api (stage, keys, etc.)
Contains a set a configurable lambdas:
- ScheduledLambdas: Lambda that runs according to a schudle exeption (every minutes, week, crontask, etc.)
- InvokableLambdas: Lambda that can be executed from another service
Few considerations when it comes to modifying the stack.
- All lambdas code goes to
/src/code
- If you don't want to use the prefefined infrastructure (Dynamo, Timeseries, RESTApi etc.), no support will be made
- Do not add to much abstraction, keep things simple
- One module = one functionality (exemple: datalake, docker orchestration, sagemaker env etc.), do not split resources belongings to same functionality (Datalake API go with the actual Datalake definition)