aws-samples/aws-modern-application-workshop

Write-S3BucketWebsite issues on deploy

Opened this issue · 2 comments

Had an issue with Deploy-Frontend.ps1.

If I have a default region set in my ~/.aws/config I receive the following error:

Write-S3BucketWebsite : The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

I can get around this by commenting out the default region but this does cause other scripts to fail later on in subsequent modules with the error "no default region set" so my only solution has really been to leave uncommented until I get the above error. Then temporarily comment out when I need to publish. This is a bit of a pain.

Hi @shauny1 - was the default region you were using in your ~/.aws/config file separate from the region you created the S3 bucket in?

I got this error the first time I tried creating the bucket.

If don't have any existing bucket, and I have a default region set (set to say eu-west-2) then the first time ever that I execute this powershell scripts I recieve the following error:

Write-S3BucketWebsite : The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.

The bucket seems to be created despite this warning, but it is created in US West (Oregon).

If I comment the region I don't get this error. Is this an issue determining the default region? How do I get the Deploy-Frontend.ps1 to work with the region specified in ~/.aws/config ?