File Paths Overview

Certain resources are served directly as publicly available files in an AWS S3 bucket, for example, user profile images and game content screenshots. When these items are returned by the API, they are represented as incomplete paths. The API consumer can make an assumption based on context which S3 bucket contains the file. Completing the path, then, is a simple job of prepending the S3 bucket’s URL.

Path Anatomy

A complete file path is made up of these parts:

  1. the S3 regional public domain name
  2. the bucket name
  3. the protected folder space
  4. the uploading user's Cognito Identity Pool Identity ID (<idpid>)
  5. the name of the file itself (possibly within additional folders)

The folder space represented by protected/<idpid> is unique to each user of course, and uploads within this space are restricted to that user. Users are unrestricted in uploading files to their own space (this may need to be further controlled in the near future), but users cannot delete or overwrite files, even their own.

Example

User avatar images are kept in the media bucket. In production, its URL is:

If a user info request returns an avatar path as follows:

The avatar image will be available at this URL:

Buckets

mediaprod.media.theendlessmission.com
the bucket for avatar images and game screenshots
contentprod.content.theendlessmission.com
the bucket for game entity and package files (exported binaries)