Reputation: 21
I have a Juypter Notebook set up within AWS Sagemaker. I wanted to find a way to launch this notebook on an autonomous trigger when a new file is uploaded to a certain folder (hence AWS Lambda). I was looking for if there was a streamlined way to trigger a Juypter Notebook with an AWS Lambda trigger.
I have looked into using API and turning Sagemaker into and endpoint, but it didnt work.
*edit Sorry if the question was a little vague. I have allot of code written in this notebook on in Juypter. What i was ideally looking for was, when a file is uploaded to "RandomFile" then the code within the notebook will run. I was looking to do this with AWS Lambda by setting up a S3 based trigger.
Upvotes: 2
Views: 2227
Reputation: 2398
Thanks for using Amazon SageMaker! Very interesting use case!
Currently, there isn't any direct way to trigger the execution of a Jupyter Notebook upon an S3-based trigger, but there are a few ways you might be able to accomplish this:
Then, just leave the Notebook Instance up-and-running at all times, and it should detect when objects are uploaded to S3.
This solution is a bit more complex, but has the advantage of being more cost-effective if you don't want your Notebook Instance running at all times.
Upvotes: 5