Choose where your files live, step by step

Every bucket is kept in one location that you choose when you create it: Mumbai, Hyderabad or Ashburn (US East), with more to follow. Pick the one closest to your people, or the one your contracts name. This page takes you from choosing a location to checking that your bucket is there. The reference is in Storage and Regions.

You need: a plycdn account and, to create a bucket from code, an admin key and one of plycdn's server packages (ASP.NET Core, Node.js or Python) or the API with your key.

1What a location means

  • Your files are stored only in the location you choose. A bucket in Ashburn (US East) keeps its files in Ashburn.
  • Processing happens in India for every location. Encoding video, captions and search indexing run in India, then the results are kept in your bucket's location. If your files must never leave a country, use strict residency instead (below).
  • Live streaming works in every location. A video library in any location can have live inputs: the stream runs in India and its recording is kept in the library's location. GET /regions says live: true for each location that offers it.
  • The price is the same in every location. Storage costs the same wherever the bucket is, and uploads to any location are at the normal upload price.
  • The location can't be changed after the bucket is created. To move files to another location, create a bucket there and copy them across.
  • Bucket addresses don't change. {name}.plycdn.net is the same wherever the bucket is, and your S3 and Azure tools use the same endpoint names for every location.

2Strict residency is for India locations

Strict residency keeps a bucket's files out of any processing outside its country. It is offered for Mumbai and Hyderabad, which are in India, where plycdn does its processing. Asking for it in Ashburn (US East) is refused with strict_residency_not_available: choose Mumbai or Hyderabad, or leave strict residency off. Strict residency also turns search off for the bucket; see Storage.

3Choose a location

In the dashboard: Storage → Storage buckets → New bucket → Location, then choose a location and create the bucket. Locations that are only for storage say "Processing happens in India" beside them.

From your code: read the locations you can use, then send one as region when you create the bucket:

GET /api/content/v1/regions
POST /api/content/v1/buckets        {"name": "acme-course-media", "region": "ashburn"}

Each location carries its code, its name, its country, strictCapable, storageOnly (files are stored there and processed in India) and processingCountry (IN). Treat the codes as data: new locations are added over time. Creating a bucket needs an admin key and an Idempotency-Key header; the server packages send the header for you.

ASP.NET Core

var regions = await storage.ListRegionsAsync(organizationId);
foreach (var r in regions) Console.WriteLine(quot;{r.Code}  {r.Name}  storage-only: {r.StorageOnly}");

var bucket = await storage.CreateBucketAsync(organizationId, new BucketCreate("acme-course-media", "ashburn")
{
    Visibility = "private",
});

Node.js

const regions = await storage.listRegions(organizationId);
for (const r of regions) console.log(r.code, r.name, r.storageOnly);

const bucket = await storage.createBucket(organizationId, { name: 'acme-course-media', region: 'ashburn' });

Python

for r in storage.list_regions(organization_id):
    print(r["code"], r["name"], r["storageOnly"])

bucket = storage.create_bucket(organization_id, {"name": "acme-course-media", "region": "ashburn"})

4Check that it works

  • In the dashboard, Storage → Storage buckets shows each bucket's location in the Location column.
  • From code, GET /buckets/{bucketId} answers "region": "ashburn". A new bucket is creating for a minute or two, then active.
  • Your S3 and Azure tools work as before. Tools that ask for the bucket's location are told its location code (for example ashburn), and signing requests with it works.

5Errors and fixes

Code What it means What to do
region_not_available (400) That location doesn't exist or isn't open yet Read GET /regions and use one of its codes
strict_residency_not_available (400) Strict residency was asked for in a location outside India Choose Mumbai or Hyderabad, or turn strict residency off
admin_key_required (403) Creating a bucket needs an admin key Use an admin key from Developers → API keys
bucket_name_taken (409) Bucket names are unique across plycdn Choose another name
idempotency_key_required (400) Creating a bucket needs an Idempotency-Key Send one; the server packages do it for you

6Where to go next