Spaces:
Sleeping
Sleeping
File size: 935 Bytes
b645f1c 09fc993 b645f1c 779d080 b645f1c 09fc993 b645f1c 09fc993 b645f1c 8ed7e05 b645f1c 8ed7e05 b645f1c 09fc993 779d080 b645f1c 779d080 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# IRIS classification task with AWS Lambda
Workflow: use of AWS lambda function for deployment
### Training the model:
bash
> python train.py
### Building the docker image:
bash
> docker build -t iris-classification-lambda .
### Running the docker container locally:
bash
> docker run --name iris-classification-lambda-cont -p 8080:8080 iris-classification-lambda
### Testing locally:
Example of a prediction request
bash
> curl -X POST "http://localhost:8080/2015-03-31/functions/function/invocations" -H "Content-Type: application/json" -d '{"features": [[6.5, 3.0, 5.8, 2.2], [6.1, 2.8, 4.7, 1.2]]}'
python
> python3 inference_api.py --url http://localhost:8080/2015-03-31/functions/function/invocations -d '{"features": [[6.5, 3.0, 5.8, 2.2], [6.1, 2.8, 4.7, 1.2]]}'
### Deployment to AWS
Steps:
- Pushing the docker container to AWS ECR
- Creating and testing a Lambda function
- Creating an API via API Gateway |