-
Notifications
You must be signed in to change notification settings - Fork 141
Description
Describe the question/issue
When running an ECS task in eu-west-1 (Ireland), using a firelens configuration that uses s3 init from a file in a bucket in eu-west-1, it attempts to pull the file from https://s3.EU.amazonaws.com/...
This is because the init Go process is using GetBucketLocation to get the region where the bucket is located, but for some reason only in eu-west-1, the LocationConstraint is "EU" instead of the region name. Consider the following awscli output:
❯ aws s3api --profile prod --region eu-west-1 get-bucket-location --bucket "(my bucket in eu-west-1)"
{
"LocationConstraint": "EU"
}
❯ aws s3api --profile prod --region eu-west-1 get-bucket-location --bucket "(my bucket in us-west-2)"
{
"LocationConstraint": "us-west-2"
}
I see in the init process code it has special handling for us-east-1 (whose LocationConstraint is an empty string). I think we need to add special handling for eu-west-1 as well.
UPDATE: I found out that on very old buckets (from around the time the eu-west-1 region was first launched), LocationConstraint is EU, but on newer buckets, it's eu-west-1.
UPDATE 2: This odd behavior is mentioned in the GetBucketLocation docs: