Skip to content

Instantly share code, notes, and snippets.

@yuyasugano
Created December 7, 2019 07:31
Show Gist options
  • Save yuyasugano/b1f719c7f4b34fd6bf9c0fe482f834f0 to your computer and use it in GitHub Desktop.
Save yuyasugano/b1f719c7f4b34fd6bf9c0fe482f834f0 to your computer and use it in GitHub Desktop.
Lambda automation handle_s3_event
def handle_s3_event(s3):
print("s3=", s3)
bucket = s3['bucket']['name']
print("bucket: ", bucket)
fn = s3['object']['key']
print("fn: ", fn)
jobid = fn.split("/")[-3]
print("jobid=", jobid)
return deploy_model(jobid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment