amazon-web-services - AWS Codebuild - UPLOAD_ARTIFACTS 阶段出错:BucketRegionError:不正确的区域,存储桶不在端点的“us-east-2”区域中
问题描述
我正在尝试使用俄亥俄州的 codebuild 项目创建工件并将其上传到北加州的 s3 存储桶。但是,构建的最后阶段失败并出现错误“UPLOAD_ARTIFACTS 阶段中的错误:BucketRegionError:不正确的区域,存储桶不在端点的 'us-east-2' 区域中”。下面我提到了 buildspec 文件。创建 Codebuild 项目以从代码提交中选择 buildspec 文件。请问,如何将俄亥俄地区的 codebuild 项目创建的工件添加到北加州地区的 s3 存储桶中?
version: 0.2
phases:
install:
runtime-versions:
python: 3.7
pre_build:
commands:
- pip install --upgrade pip
- pip install cfn-lint
build:
commands:
- echo Build started on `date`
- cd ./folder
- aws cloudformation package --template-file testing.yml --output-template-file testing-packaged-cf.yml --s3-bucket codepipeline-test-bucket --region us-west-1
- echo $PWD
post_build:
commands:
- echo Build completed on `date`
- echo $PWD
artifacts:
files:
- testing-packaged-cf.yml
base-directory: $PWD
解决方案
将工件一次输出到俄亥俄地区,然后在目标 S3 存储桶(俄亥俄地区)和北加州地区的 S3 存储桶之间进行跨地区复制,如何?
推荐阅读
- javascript - 如何获取数据快照,然后在 firebase 云函数 http 请求中更新数据库
- javascript - React-redux - 控制台给出“TypeError:props.fetchSearchResults 不是函数”
- git - Git Merge 表示分支已经是最新的
- javascript - 使用谷歌标签管理器显示覆盖弹出窗口
- python - CPython:为什么 += 字符串会改变字符串变量的 id
- docker - 激活 dockerized 主机
- html - 带有白色光标的透明输入文本和背景
- javascript - Twilo 聊天(JavaScript API):重新连接到同一频道后,频道的创建者无法删除频道
- dto - 使用 DTO 获取数据库名称时不同版本的 PSQL
- javascript - videojs如何播放录制的视频?