Last active
November 29, 2021 19:59
-
-
Save ismaelc/b1494bdb1992e74da7a3b1a89d873a0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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