Skip to content

Instantly share code, notes, and snippets.

@gleeb
Last active August 11, 2022 11:23
Show Gist options
  • Save gleeb/392cdc8bac67391619a4734872b884c3 to your computer and use it in GitHub Desktop.
Save gleeb/392cdc8bac67391619a4734872b884c3 to your computer and use it in GitHub Desktop.
sagemaker invoke async endpoint
import boto3
sm_client = boto3.client('sagemaker', region_name='us-east-1')
sagemaker_runtime = boto3.client("sagemaker-runtime", region_name='us-east-1')
# Specify the location of the input.
input_location = "<Path to your csv file in S3>"
# The name of the endpoint. The name must be unique within an AWS Region in your AWS account.
endpoint_name='titanic-survival-async-endpoint'
response = sagemaker_runtime.invoke_endpoint_async(
EndpointName=endpoint_name,
InputLocation=input_location)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment