Coder Social home page Coder Social logo

faic-project-aws-template's Introduction

Fintech Artificial Inteligence Consortium LAB AWS Project Template

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.

Important consideration

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...

How to use?

Please, learn how to use terraform and how AWS works before doing anything...

  1. 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.

  2. Modify the infrastructure definition.

  3. run pipenv install

  4. 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

  5. Check the outputs.json file to find API url and API keys.

Commands

  • make zip_lambdas: compress lambdas code
  • make deploy: deploy stack
  • make output: write outputs to outputs.json
  • make destroy: destroy the stack (bad idea)

Modules

DynamoDB

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

Timestream: src.timestream preconfigured timestream table for timestaries

RESTApi

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.)

Lambdas

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

Modifying the stack

Few considerations when it comes to modifying the stack.

  1. All lambdas code goes to /src/code
  2. If you don't want to use the prefefined infrastructure (Dynamo, Timeseries, RESTApi etc.), no support will be made
  3. Do not add to much abstraction, keep things simple
  4. 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)

โš ๏ธ๐Ÿ”ดThere is no ctrl-z in terraform and AWS๐Ÿ”ดโš ๏ธ

faic-project-aws-template's People

Contributors

mrethic avatar

Watchers

 avatar

Forkers

financeit-unsw

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.