S3 region vs. Discourse region

AI-generated summary

In a support discussion titled “S3 region vs. Discourse region,” dandv reports that forum backups fail due to a mismatch between the S3 bucket’s region and the region configured in Discourse’s Files setting. dandv questions why Discourse uses technical region names (e.g., ap-northeast-1, us-gov-west-1) instead of AWS’s human-readable ones (e.g., Tokyo, Ireland), and asks if Discourse could auto-create backup buckets to avoid manual region configuration. zogstrip clarifies that Discourse needs the region to communicate with or create S3 buckets, and that S3 always requires a region (defaulting to US East if unspecified). In response to dandv, zogstrip confirms the Discourse region must match the S3 bucket’s region and acknowledges the naming confusion, promising to improve localization. Later, zogstrip announces that S3 region names in Discourse are now localized to match AWS’s display names, improving clarity for users as implemented here.

My forum’s backups don’t work due to a mismatch between the region of the S3 bucket specified on Amazon’s site, and the region specified in the Discourse Files setting.

Another user had the same problem:

https://meta.discourse.org/t/backups-not-uploading-to-s3/19707/8?u=dandv

What exactly does the Discourse region setting do, since the S3 bucket already has a region assigned to it when you create it?

Also,

Maybe the Discourse region setting is used when creating S3 buckets automagically?

Would it be possible to automagically create the backup bucket as well, and avoid having to mess with region settings?

We need to know the region the bucket was created in otherwise we won’t be able to “talk to it”.

The Discourse region setting is used to know which region of S3 to use. Be it to talk to an existing bucket or to create a new one.

S3 requires a region (if you don’t specify one, it will default to US East)

Does the Discourse region need to be set to the same region as that of the S3 buckets?

What is the mapping between S3 regions, and Discourse regions? Could Discourse simply use the same set of names that S3 uses, i.e.

US Standard
Oregon
Northern California
Ireland
Singapore
Tokyo
Sydney
Sao Paulo
Frankfurt
Seoul

Discourse has ap-northeast-1, ap-southeast-1, ap-southeast-2, us-gov-west-1 right now, which to me at least, is unnecessarily confusing. I actually can’t fathom what us-gov-west-1 might correspond to, or whether Ireland and Frankfurt are both eu-west-1 or something else. Am I missing something here? Is there a good reason for using those names instead of the S3 city/region names?

Here’s another user wondering why these are named differently.

Yes.

The names used in Discourse are the “technical” names. They used to show these instead of City/Country. I will make sure they’re properly translated so they better match those displayed by AWS :wink:

There you go @dandv. S3 region names are now localized :evergreen_tree:

https://github.com/discourse/discourse/commit/11ea16a91ad0179b55d4ded2081e0beda699c93e