简体   繁体   中英

AWS Codebuild - Error in UPLOAD_ARTIFACTS phase: BucketRegionError: incorrect region, the bucket is not in 'us-east-2' region at endpoint

I'm trying to create the artifact and upload it to s3 bucket in North California using codebuild project in Ohio. But, the final stage of the build is failing with the error "Error in UPLOAD_ARTIFACTS phase: BucketRegionError: incorrect region, the bucket is not in 'us-east-2' region at endpoint". Below I have mentioned the buildspec file. Codebuild project is created to pick the buildspec file from code commit. May I know, how can I add the artifact created from codebuild project in Ohio region to s3 bucket in North California region?

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 存储桶之间进行跨地区复制?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM