# DeploymentBucket not working when not in us-east-1

**URL:** <https://forum.serverless.com/t/deploymentbucket-not-working-when-not-in-us-east-1/10259>\
**Category:** Serverless Framework\
**Created:** [January 15, 2020, 1:19am UTC](https://forum.serverless.com/t/deploymentbucket-not-working-when-not-in-us-east-1/10259 "2020-01-15T01:19:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdeusch](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@sdeusch](https://forum.serverless.com/u/sdeusch)\
**Post date:** [January 15, 2020, 1:19am UTC](https://forum.serverless.com/t/deploymentbucket-not-working-when-not-in-us-east-1/10259/1 "2020-01-15T01:19:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![sdeusch](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@sdeusch](https://forum.serverless.com/u/sdeusch)\
**Post date:** [January 16, 2020, 4:43am UTC](https://forum.serverless.com/t/deploymentbucket-not-working-when-not-in-us-east-1/10259/2 "2020-01-16T04:43:57Z")

</div>

Update: removing a policy that required MFA (multi factor authentication) for that user made SLS work.  
Having a MFA requirement on a user apparently can mess up API access.

---

<div class="post-metadata">

**Author:** ![camhart](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@camhart](https://forum.serverless.com/u/camhart)\
**Post date:** [May 7, 2021, 8:09pm UTC](https://forum.serverless.com/t/deploymentbucket-not-working-when-not-in-us-east-1/10259/3 "2021-05-07T20:09:52Z")

</div>

This appears to be the case with SourceIp restrictions as well… which is disappointing.
