Skip to content

Instantly share code, notes, and snippets.

@ismaelc
Last active November 29, 2021 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ismaelc/b1494bdb1992e74da7a3b1a89d873a0c to your computer and use it in GitHub Desktop.
Save ismaelc/b1494bdb1992e74da7a3b1a89d873a0c to your computer and use it in GitHub Desktop.
# Stop the notebook execution
raise SystemExit('Notebook end')
# Send this notebook to the runner
notebook = '<your notebook>.ipynb'
src = '<your S3 bucket/folder>'
notebook_uri = f'{src}{notebook}'
!aws s3 cp {notebook} {notebook_uri}
payload = '{"input_path": "NOTEBOOK_URI", "image": "<image name>"}'.replace('NOTEBOOK_URI', notebook_uri)
print(payload)
!aws lambda invoke --function-name RunNotebook --payload '{payload}' result.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment