Articles
Tutorials
Interactive Guides
Setup the AWS SageMaker pre-trained model
![Warren Marusiak headshot](https://wac-cdn.atlassian.com/dam/jcr:7509aefb-43e8-401d-90fe-0850cbe6bb13/wmarusiak_headshot%20(1).png?cdnVersion=2521)
Warren Marusiak
Senior Technical Evangelist
To demonstrate how to develop, deploy, and manage applications using Jira Software and various connected tools, our team created ImageLabeller, a simple demo application built on AWS that uses machine learning to apply labels to images.
This page covers how to setup an AWS SageMaker predefined model, a prerequisite for ImageLabeller to successfully process images. Before you begin, we recommend reading the ImageLabeller architecture for context.
Log in to AWS Console and navigate to Amazon SageMaker.
![Screenshot of AWS console](https://wac-cdn.atlassian.com/dam/jcr:312699b3-a880-49f6-a54b-655fd849a1b3/AWS_console.png?cdnVersion=2521)
Go to Amazon SageMaker Studio.
![Screenshot of Amazon SageMaker Studio](https://wac-cdn.atlassian.com/dam/jcr:36e40d90-7538-45b9-a5d7-d7b0018a19c6/Amazon_SageMaker_Studio.png?cdnVersion=2521)
Choose Quick start > Execution role > Create an IAM role.
![Screenshot of Quick start](https://wac-cdn.atlassian.com/dam/jcr:a7890497-0970-4cfd-a075-67fa87561bfa/Quick_start_and_click_Execution_role_dropdown.png?cdnVersion=2521)
Click Create role. Then click Submit.
![Screenshot of Create an IAM role](https://wac-cdn.atlassian.com/dam/jcr:2c84d98f-87e8-474c-aafd-6d8d89187d6f/Click_Create_role.png?cdnVersion=2521)
SageMaker will take a while to setup. Once it’s ready, click Open Studio.
![Screenshot of post-setup](https://wac-cdn.atlassian.com/dam/jcr:97cef6bc-4800-4384-8286-d5f6880b7ca3/After_setup__click_Open_Studio.png?cdnVersion=2521)
Click Go to SageMake JumpStart.
![Screenshot of SageMaker JumpStart](https://wac-cdn.atlassian.com/dam/jcr:9ff55612-7e77-4e9b-b8dd-f5ca7ae40c50/sagemaker.png?cdnVersion=2521)
Locate, and click on Inception V3.
![Screenshot of vision models](https://wac-cdn.atlassian.com/dam/jcr:bb0efbb6-c394-4160-8157-9c70f7663c4a/sagemaker_inception_v3.png?cdnVersion=2521)
Change the Machine Type to ml.m5.large, change the Endpoint Name to something more readable like “image-labeller-endpoint”, and click Deploy.
![Screenshot of deploy model](https://wac-cdn.atlassian.com/dam/jcr:79d0ee62-44c2-4e3f-98e4-c00ec4e2c738/Change_the_Endpoint_Name_and_click_Deploy.png?cdnVersion=2521)
AWS SageMaker will start to deploy the model.
![Screenshot of deployment starting](https://wac-cdn.atlassian.com/dam/jcr:af1d17d2-65a1-4697-b091-a4d57059f522/SageMaker_starts_to_deploy.png?cdnVersion=2521)
Click Open Notebook when the deployment is finished.
![Screenshot of endpoint status](https://wac-cdn.atlassian.com/dam/jcr:fe9c84ce-6473-4b62-85ff-dcd875d4c4b4/Click_Open_Notebook.png?cdnVersion=2521)
Run all three of the notebook code blocks in order to verify things are working. Make a note of the endpoint_name in query_endpoint. You need to add this, and the region your AWS SageMaker notebook is in to the InvokeLabeller AWS Lambda.
For information on how to use Jupyter notebooks please read the documentation.
![Screenshot query endpoint](https://wac-cdn.atlassian.com/dam/jcr:fda5d373-1eea-44d6-9853-f297f5150b5c/Query_endpoint_that_you_created.png?cdnVersion=2521)
Open InvokeLabeller’s src/app.py file and look for query_endpoint. change the endpoint_name, and client region_name to match your AWS SageMaker notebook.
def query_endpoint(img):
endpoint_name = 'jumpstart-dft-image-labeller-endpoint'
client = boto3.client(service_name='runtime.sagemaker', region_name='us-west-1')
response = client.invoke_endpoint(EndpointName=endpoint_name, ContentType='application/x-image', Body=img)
model_predictions = json.loads(response['Body'].read())['predictions'][0]
return model_predictions
Share this article
Next topic
Recommended reading
Bookmark these resources to learn about types of DevOps teams, or for ongoing updates about DevOps at Atlassian.
![Devops illustration](https://wac-cdn.atlassian.com/dam/jcr:bd9d8b2c-ca36-444f-8595-719cb1990e64/Devops-community.png?cdnVersion=2521)
DevOps community
![Devops illustration](https://wac-cdn.atlassian.com/dam/jcr:297108ea-d232-4368-af51-b53af230c4fe/Simulation-workshop.png?cdnVersion=2521)
DevOps learning path
![Map illustration](https://wac-cdn.atlassian.com/dam/jcr:25f6330a-4191-408f-a4e5-2e24bfba67b4/Maturity-model.png?cdnVersion=2521)