gatsby-uc / gatsby-plugin-s3

Deploy your gatsby site to a S3 bucket.
https://gatsby-plugin-s3.jari.io/
MIT License
210 stars 110 forks source link

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

Open dan-lind opened 2 years ago

dan-lind commented 2 years ago

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"