Reputation: 113
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
Upvotes: 0
Views: 1634
Reputation: 129
How about outputting the artifacts to the Ohio region once, and then cross-region replication between the destination S3 bucket (Ohio region) and the S3 bucket in the Northern California region?
Upvotes: 1