├── 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
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
Java Project
cd software/java/HelloWorldFunction
mvn package
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
Make a request for a model calculation
POST /
{
"requestId": "UUID",
"vechicalType": "Car | Truck | Van",
"vechicalModel": "Ford Focus",
"vechicalAge": 9
}