Please add region configuration in S3DeployAction for cross-region deployment.
I have a pipeline that supports cross-region deployment in us-west-2. A deployment stage of my pipeline looks like:
*Pipeline is in us-west-2
...
Deploy stage:
CF CF
(us-east-1) (us-west-2)
|
S3
(us-east-1)
...
I can set region for CloudFormationCreateUpdateStackAction, so it can support cross region deployment. However, S3DeployAction does not have region config in S3DeployActionProps. The target S3 bucket is created by the us-east-1 CF action above and the bucket is located in us-east-1. Therefore, S3DeployAction fails with the below message in console:
Invalid action configuration
The bucket named [BUCKET_NAME] is not located in the us-west-2 AWS region
I manually changed the region of the action in the console to resolve the problem.
It would be great if you can add region to S3DeployActionProps and support cross-region deployment for S3DeployAction.
This is a :rocket: Feature Request
Hey @handk85 ,
how are you referencing this bucket created by the CF action and used in S3DeployAction? Are you using a method like Bucket.fromBucketName() to do it?
Yes, I am using Bucket.fromBucketName() and provide it to bucket property of S3DeployActoin.
Then you need to import the Bucket with fromBucketName into a Stack that is in the region you want (in your case, us-east-1). When that happens, the CodePipeline construct will recognize that situation, and correctly fill the configuration of the action so that it points to us-east-1.
Any progress on this one?
Any updates on this? :) I would also like to specify the bucket region, cause my pipeline is in eu-west-2 and my bucket is in us-east-1. Since it can be done manually from the GUI, I'm guessing there's a way to be done from CDK as well.
@adrian-hincu yes. We're very close to finalizing this in #8280 . Then, you would be able to do:
const myBucket = s3.Bucket.fromBucketAttributes(this, 'Bucket', {
bucketName: 'my-bucket',
region: 'my-region',
});
And when you used that Bucket in the deploy Action, it would correctly set its region to 'my-region'.
@skinny85, was this just released in 1.61.0? :)
In 1.60.0 actually 馃檪
Most helpful comment
@adrian-hincu yes. We're very close to finalizing this in #8280 . Then, you would be able to do:
And when you used that Bucket in the deploy Action, it would correctly set its region to
'my-region'.