gatsby-plugin-s3 icon indicating copy to clipboard operation
gatsby-plugin-s3 copied to clipboard

LocationConstraint should not be set when region is configured as us-east-1

Open dan-lind opened this issue 3 years ago • 0 comments

The following line unconditionally sets the LocationConstraint if a region is specified. https://github.com/jariz/gatsby-plugin-s3/blob/master/gatsby-plugin-s3/src/bin.ts#L199

But per the S3 API documentation, us-east-1 is not a valid LocationConstraint. https://docs.aws.amazon.com/AmazonS3/latest/API/API_CreateBucketConfiguration.html

When we configure our region to be us-east-1 in the plugin, AWS responds with "The specified location-constraint is not valid"

dan-lind avatar Oct 21 '22 11:10 dan-lind