We have a IAM policy that allows resources only in us-west-2 region.
Whenever I run ‘sls deploy’ telling the framework to use a pre-existing bucket with:
provider:
deploymentBucket:
name: mydeployment-bucket-in-us-west-2
it uploads the zip files to the bucket, so far so good.
But when AWS cloud-formation validates the stack creation it fails with the error:
Error: The CloudFormation template is invalid: S3 error: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
The framework is trying to access the template from this URL
https://s3.amazonaws.com/mybucket/serverless/…/compiled-cloudformation-template.json
while the correct URL for us-west-2 would be
https://s3-us-west-2.amazonaws.com/mybucket/serverless/…/compiled-cloudformation-template.json
Am I forgetting something in serverless, or is this a bug/unsupported feature?