Skip to content

msailes/symmetrical-octo-sniffle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

symmetrical-octo-sniffle

High Level Architecture

Infrastructure

Project Structure

├── infrastucture
│   ├── README.md
│   ├── cdk.json
│   ├── pom.xml
│   └── src
│       ├── main
│       │   └── java
│       │       └── com
│       │           └── myorg
│       │               ├── InfrastuctureApp.java
│       │               └── InfrastuctureStack.java
└── software
    ├── java
    │   ├── HelloWorldFunction
    │   │   ├── pom.xml
    │   │   └── src
    │   │       ├── main
    │   │       │   └── java
    │   │       │       └── helloworld
    │   │       │           └── App.java
    │   ├── README.md
    │   ├── events
    │   │   └── event.json
    │   └── template.yaml
    └── python
        ├── README.md
        ├── __init__.py
        ├── events
        │   └── event.json
        ├── hello_world
        │   ├── __init__.py
        │   ├── app.py
        │   └── requirements.txt
        ├── template.yaml

Infrastructure

Using AWS Serverless to deploy Machine learning models

The client makes an API request to a python Lambda which runs through some logic and triggers the Java Lambda function containing the ML model

Prerequisite

  • AWS CLI
  • Install JDK
  • Install Maven
  • Install NodeJS
  • Install CDK

Build

Java Project

cd software/java/HelloWorldFunction
mvn package

Deploy

cd infrastructure
cdk bootstrap
cdk deploy

Note: If you get a "could not assume role" error, try bootstrapping the stack using the below command. This should create all required roles automatically.

cdk bootstrap --trust=ACCOUNT_ID --cloudformation-execution-policies=arn:aws:iam::aws:policy/AdministratorAccess 

API

REST API

Make a request for a model calculation

POST /

{
  "requestId": "UUID",
  "vechicalType": "Car | Truck | Van",
  "vechicalModel": "Ford Focus",
  "vechicalAge": 9
}

Useful Resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •