Why does cfdirecotry tag support specific regions while using S3

why does cfdirecotry tag support specific regions while using S3
it can only be EU, US or US-West
Why I cannot set other location as storelocation?
This need to be fix at following area

Those aren’t even valid AWS region names e.g. eu-west-1

I don’t know how or where this code is called though, can your elaborate ?

Not sure what happened to my previous post - but anyway…

I have started having a crack at this;
Updating the AWS regions - and have a question;
The following code is a portion for improveStorage() - but just for us-east-1

Am I reading the existing code / altering it correctly?
In that the ifs are possible versions someone “might” use?
Couldn’t we just use “the” list of regions and have coders use the “exact” match?

if ("us".equals(storage)) return "us-east-1";
		if ("us east".equals(storage)) return "us-east-1";
		if ("us-east".equals(storage)) return "us-east-1";
		if ("us-east-1".equals(storage)) return "us-east-1";
		if ("us east 1".equals(storage)) return "us-east-1";
		if ("us-east 1".equals(storage)) return "us-east-1";
		if ("n. virginia".equals(storage)) return "us-east-1";
		if ("n virginia".equals(storage)) return "us-east-1";
		if ("us east n. virginia".equals(storage)) return "us-east-1";
		if ("us east n virginia".equals(storage)) return "us-east-1";
		if ("virginia".equals(storage)) return "us-east-1";
		if ("usa".equals(storage)) return "us-east-1";
		if ("u.s.".equals(storage)) return "us-east-1";
		if ("u.s.a.".equals(storage)) return "us-east-1";
		if ("united states of america".equals(storage)) return "us-east-1";

At this rate I might get through all 25 of them (AWS Regions) - by the time I am 100!

  • us-east-1
  • us-east-2
  • us-west-1
  • us-west-2
  • af-south-1
  • ap-east-1
  • ap-southeast-1
  • ap-southeast-2
  • ap-southeast-3
  • ap-south-1
  • ap-northeast-1
  • ap-northeast-2
  • ap-northeast-3
  • ca-central-1
  • eu-central-1
  • eu-west-1
  • eu-west-2
  • eu-south-1
  • eu-west-3
  • eu-north-1
  • me-south-1
  • me-central-1
  • sa-east-1
  • us-gov-east-1
  • us-gov-west-1

In the issue LDEV-4178
I agreed with @Zackster - that we should remove the AWS helper from the directory() function.
There are currently 25 AWS regions.
It will take considerable effort to add “English” helpers for each of the 25 - And to maintain them.

If AWS changes anything - you have to update again…

And then, what about all the other “storage” providers?

While it is nice to be nice… we should just pass through the arguments provided.

1 Like

yes we should pass through the argument and then check if it is according to the requirement of the provider
We cannot do hard code many regions