Skip to content

Instantly share code, notes, and snippets.

@andreaschandra
Created May 14, 2018 08:18
Show Gist options
  • Save andreaschandra/650d5eb274df8c32cdf8885fad0d6b8c to your computer and use it in GitHub Desktop.
Save andreaschandra/650d5eb274df8c32cdf8885fad0d6b8c to your computer and use it in GitHub Desktop.
%%time
kmeans_endpoint = 'topic-kmeans-endpoint'
print(kmeans_endpoint)
create_endpoint_response = sm.create_endpoint(
EndpointName = kmeans_endpoint,
EndpointConfigName = kmeans_endpoint_config)
print(create_endpoint_response['EndpointArn'])
resp = sm.describe_endpoint(EndpointName = kmeans_endpoint)
status = resp['EndpointStatus']
print("Status: " + status)
sm.get_waiter('endpoint_in_service').wait(EndpointName = kmeans_endpoint)
resp = sm.describe_endpoint(EndpointName= kmeans_endpoint)
status = resp['EndpointStatus']
print("Arn: " + resp['EndpointArn'])
print("Status: " + status)
if status != 'InService':
raise Exception('Endpoint creation did not succeed')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment