Happenings at MTurk

Every day Amazon Mechanical Turk (MTurk) helps Requester customers solve a range of data processing, analysis, and moderation challenges. This is made possible by the contributions from Worker customers around the world that power the MTurk marketplace.

Follow publication

Hosting Your HIT Images Using Amazon S3

--

In this tutorial we’ll walk you through the steps to host your HITs’ images using Amazon S3. This tutorial assumes you are already comfortable including images in your HITs but need a place to store them. If you are not sure how to include images in your HITs please read this blog post first.

About Amazon S3

Amazon S3 is an online cloud storage service from Amazon Web Services (AWS). It lets you store, retrieve, and link to files.

There are two important concepts for S3: Objects and Buckets. Objects are the files you store. They can be any type of file but for this tutorial we’ll stick to images. A bucket is a place in S3 you control that holds objects. Think of a bucket like a folder on a computer — except it’s on AWS’s servers. S3 works with your AWS account and lets you store up to 5 GB of data for free. For more information on data usage, refer to AWS’s free tier guide.

For example, this image of Abbey the dog (abbey.jpg) is stored in an S3 bucket we created named ‘mturk-s3-demo’.

The image is located at https://s3.amazonaws.com/mturk-s3-demo/abbey.jpg where “mturk-s3-demo” is the Bucket name, while “abbey.jpg” is the Object name.

Uploading Your Images to S3

There are three high level steps to host your HITs’ images on S3: 1) Create an S3 bucket, 2) Upload your images, and 3) Use the image URLs in your HITs. We’ll walk you through the details below.

Step 1 Create an S3 bucket

  • Go to the S3 web console.
  • Sign in with your Amazon Web Services email address/password.
  • Click “Create Bucket”.
  • Enter a bucket name and click “Create”. This name has to be unique across all S3 accounts. If you receive a bucket name error, use a different name and try again.

Step 2 Upload your images

  • Click on the bucket name from the All Buckets list. Once you are inside the bucket, click “Upload”.
  • Click “Add Files” and select your files. Before clicking “Start Upload”, click “Set Details”.
  • From the Set Details page, click “Set Permissions”.
  • Select “Make everything public” to allow Workers to see your images and then click “Start Upload”.

Step 3 Use the image URLs in your HITs

  • Select an image by clicking on its checkbox, then open your image’s properties to view its URL.
  • Copy the link.
  • Go to the URL to verify that your image’s permission was set correctly. If you get an Access Denied error that means you haven’t set the permissions correctly.
  • Collect the URLs for all the images you want to include in your HITs and add them to the input CSV file. If you are using the Requester API, you can reference the images directly by the URLs.

Once the input file is uploaded, preview the HITs in your batch to verify that the images are loaded properly.

--

--

Published in Happenings at MTurk

Every day Amazon Mechanical Turk (MTurk) helps Requester customers solve a range of data processing, analysis, and moderation challenges. This is made possible by the contributions from Worker customers around the world that power the MTurk marketplace.