How to set up an Amazon S3 bucket for TagSet

Time
About 15 minutes
Cost
Cents a month for a few GB; new accounts get credits
You end up with
A private bucket and keys that can only add photos to it

Already on AWS, or need your data in S3? You'll create a private bucket and an IAM user whose keys can only upload photos to that one bucket. They can't open or download anything, so even keys taken from a lost phone can't download your dataset.

What it costs

  • Storage and uploads cost a few cents a month for a few GB of photos, pay as you go (S3 pricing). New accounts get signup credits that cover this for months (AWS Free Tier).
  • Downloading your dataset to your computer counts as data transfer out. The first 100 GB a month across your AWS account are free; beyond that it's billed per GB. Cloudflare R2 has no download fees at all, if you don't need to be on AWS.

Set it up

  1. Create a bucket

    Open the S3 console and choose Create bucket. Pick the AWS Region nearest to where you'll use TagSet, for example eu-central-1 (Frankfurt) or us-east-1 (N. Virginia), and note it: TagSet needs it later.

    Keep the bucket type General purpose and give it a name that's unique across all of AWS, for example tagset-dataset-yourname. Leave Object Ownership on ACLs disabled and Block all public access turned on. Set Bucket Versioning to Enable, then choose Create bucket.

    Versioning keeps the old copy whenever a file is overwritten, so nobody with the TagSet keys can destroy a photo by uploading over it. TagSet never overwrites files itself, so this costs nothing extra in normal use.

  2. Create the upload-only policy

    Open IAM → Policies and choose Create policy. Switch the policy editor to JSON and replace everything in it with this policy. Change YOUR-BUCKET in both places to your bucket's name:

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Sid": "UploadPhotos",
          "Effect": "Allow",
          "Action": "s3:PutObject",
          "Resource": "arn:aws:s3:::YOUR-BUCKET/*"
        },
        {
          "Sid": "TestConnection",
          "Effect": "Allow",
          "Action": "s3:ListBucket",
          "Resource": "arn:aws:s3:::YOUR-BUCKET"
        }
      ]
    }

    Choose Next, name it TagSetUploadOnly and choose Create policy.

    What it allows, and nothing more:

    • s3:PutObject on YOUR-BUCKET/*: add photos to the bucket. It could also overwrite an existing file, which is why step 1 turns on versioning.
    • s3:ListBucket on YOUR-BUCKET: Test Connection lists the bucket to check your settings. This also lets the keys see file names in the bucket, but not open the files.
  3. Create an IAM user for TagSet

    Open IAM → Users and choose Create user. Name it tagset-uploader and leave Provide user access to the AWS Management Console unchecked: this user only needs keys. On the next page choose Attach policies directly, search for TagSetUploadOnly, tick it, and finish with Create user.

  4. Create an access key

    Open the new user, go to the Security credentials tab and choose Create access key under Access keys. As the use case, choose Application running outside AWS. If AWS suggests alternatives, you can continue: TagSet runs on your phone and needs a regular access key.

    Add a description like TagSet iPhone if you want, then choose Create access key. Copy the Access key and the Secret access key now: AWS shows the secret only on this page. If you download the .csv as a backup, delete it once TagSet is set up.

  5. Enter everything in TagSet

    In TagSet, open Settings → Cloud Storage and fill in:

    TagSet fieldWhat to enterExample
    Endpoint URLhttps://s3.<region>.amazonaws.com with your bucket's region, without the bucket namehttps://s3.eu-central-1.amazonaws.com
    Bucket NameYour bucket's name from step 1tagset-dataset-yourname
    Access Key IDAccess key from step 420 characters, starts with AKIA
    Secret Access KeySecret access key from step 440 characters
    Region (under Advanced)Your bucket's region. Required for S3.eu-central-1
    Key Prefix (optional)A folder to put all uploads in, or nothingdataset/
  6. Test it and take your first photo

    Tap Test Connection. Connection successful! means TagSet could reach and list your bucket with these keys and region. It doesn't check the upload permission; your first photo does. Tap Save, take a photo and pick a label. With auto-upload on (the default), it shows up a few seconds later in the bucket's Objects tab in the S3 console, filed under its label:

    <label>/<timestamp>_<id>.jpg
    cat/2026-10-31T14-05-09_3f9a1c2e.jpg

    Folder names are your labels in lowercase, with spaces turned into underscores. Accents and special characters are dropped, so “Käse” is filed under kse/. The timestamp is in UTC. With a key prefix, it comes first: dataset/cat/….

Troubleshooting

When something's wrong, TagSet shows Connection failed: followed by the error, which includes the HTTP status code.

You seeLikely causeFix
Status code 400 Region is still auto or doesn't match the bucket's region Set Region to the bucket's region, for example eu-central-1.
Status code 301 The endpoint points to a different region than the bucket is in Use https://s3.<bucket's region>.amazonaws.com.
Status code 403 A key is wrong or incomplete, the access key was deactivated, the policy isn't attached to the user, YOUR-BUCKET wasn't replaced in the policy, or the endpoint includes the bucket name End the endpoint at .amazonaws.com. Copy both keys again. Check that tagset-uploader has TagSetUploadOnly attached and both resource lines name your bucket.
Test works, but uploads fail with 403 The s3:PutObject resource is missing the /* It must read arn:aws:s3:::YOUR-BUCKET/*.
Status code 404 Bucket name typo Check the bucket name.
Connection error or host lookup failed Typo in the endpoint Check the region code in https://s3.<region>.amazonaws.com.

How safe are these keys?

  • Upload only, one bucket only. The keys can add photos to this bucket and see its file names. They can't open, download or delete photos, and can't touch anything else in your AWS account. They could upload over an existing file, but with versioning on the original stays recoverable.
  • They stay on your iPhone. TagSet keeps them in the iOS Keychain. There's no TagSet server, so they only ever go to AWS.
  • Revoke them anytime. In IAM, open tagset-uploader → Security credentials and deactivate or delete the access key. Uploads stop right away; photos already in the bucket stay.

Next: get your dataset onto your computer

The TagSet keys can't download, by design. Use the AWS CLI with your own credentials (set them up once with aws configure), then sync the bucket into a local folder:

aws s3 sync s3://YOUR-BUCKET ./dataset

If you used a key prefix, sync that folder instead, for example s3://YOUR-BUCKET/dataset. You get one folder per label, which most ML tooling reads directly:

from torchvision.datasets import ImageFolder

ds = ImageFolder("dataset/")
print(ds.classes)  # one class per label folder

Don't need AWS? Cloudflare R2 is free up to 10 GB and has no download fees.