# AWS S3 使用 travis 编译的时候提示错误 Aws::S3::Errors::PermanentRedirect

**URL:** <https://www.isharkfly.com/t/aws-s3-travis-aws-permanentredirect/780>\
**Category:** 云计算\
**Created:** [December 22, 2020, 3:40am UTC](https://www.isharkfly.com/t/aws-s3-travis-aws-permanentredirect/780 "2020-12-22T03:40:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [December 22, 2020, 3:40am UTC](https://www.isharkfly.com/t/aws-s3-travis-aws-permanentredirect/780/1 "2020-12-22T03:40:10Z")

</div>

具体的提示错误信息如下：

```auto
uploading "asciidoc/js/jquery-3.2.1.min.js" with {:content_type=>"application/javascript"}

/home/travis/.rvm/gems/ruby-2.4.5/gems/aws-sdk-core-2.11.632/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call': The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint. (Aws::S3::Errors::PermanentRedirect)

```

这是因为在我们的配置文件下 travis 将会把数据存储到 S3 的 us-east-2 存储区。

![travis-s3-01](https://www.isharkfly.com/images/transparent.png)

如果你的 S3 存储没有设置到正确的存储区的话，你使用 travis 将数据上传到 S3 将会提示错误。

请参考 [S3 Deployment - Travis CI](https://docs.travis-ci.com/user/deployment/s3/) 官方文档中有关 AWS S3 的配置。

当然你也可以在配置文件中添加

```auto
region: eu-west-2

```

来指定特定的存储区。

![travis-s3-02](https://www.isharkfly.com/images/transparent.png)

然后再次编译，你就发现编译成功的文件已经上传上去了。
