What I’m trying to do:
I’m an Advertising Copywriter who’s studying and working to use aspects of Data Science and AI (NLP especially) to make advertising better and more effiicient. One thing I’m particularly interested in using Sagemaker Autopilot to run fast and extensive ML algos and serve them in an interactive landing page (the ad industry is very much about “Let’s see something by 5 o’clock”.) Sagemaker Autopilot ultimately deploys the model to an HTTP endpoint (or also some python). I’d like to be able to have potential customers (on a landing page built in Anvil) input some simple data or text, connected to that AWS Autopilot endpoint. I code but I’m not that great at it. Seems like I should be able to do this with Anvil, since the normal way to do this would be a fullstack web app (React, FastAPI / Flask). I can’t find any tutorials or info on this anywhere. Any ideas?
What I’ve tried and what’s not working:
Have been working to learn Anvil and built some tutorial apps. Can work in AWS Sagemaker Autopilot. Can’t find a way to connect the two.
Thanks for any suggestions or references to tutorials. 
Code Sample:
# this is a formatted code snippet.
# paste your code between ```
Clone link:
share a copy of your app
I do not know anything about AWS Sagemaker Autopilot. I’ll list some possibilities that your knowledge of it should let you choose between.
- You are given an HTTP endpoint to use to send data to AWS Sagemaker
Use the requests module to call that HTTP endpoint after collecting data from the user: Anvil Docs | Making HTTP requests
- AWS Sagemaker pulls data from S3 buckets
Collect the data from the user in Anvil, and then in a server function use the boto3 Python library to put the data into S3. I think that would require a paid plan to be able to access an external Python library in Anvil.
Those seem like the most common ways Amazon might give you to interact with one of their services.
1 Like
Very Helpful. Thank you. Maybe a little bit beyond my pay grade to actually figure out how to put all that together but very helpful
Hi @lesguessing, and welcome to the forum 
I’m not personally a SageMaker expert, but we can definitely help you with the Anvil parts!
Do you know enough SageMaker to get that REST API deployed somewhere? Do you have sample Python code that uses that API? If you can bring us those, we can probably help you with the rest.
oh wow, thank you. I’ve been watching your talks and videos at different events. I’m in the middle of moving but will post it here as soon as I can. I really believe this is a good use case for Anvil. (And great for my own purposes). AWS, Azure and Google Cloud all do AutoML and it’s pretty good. One click will deploy it to and HTTP endpoint or also some Python code. I’ve been searching for what how to turn that into a a web app that a consumer/customer or company employee could use and interact with. I will get back to you as soon as I have that. I really appreciate you taking the time to respond and possibly help:)
Les
1 Like