Created
May 14, 2018 08:18
-
-
Save andreaschandra/650d5eb274df8c32cdf8885fad0d6b8c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
%%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