question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Region config for S3DeployAction

See original GitHub issue

Please add region configuration in S3DeployAction for cross-region deployment.

Use Case

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.

Proposed Solution

It would be great if you can add region to S3DeployActionProps and support cross-region deployment for S3DeployAction.

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
skinny85commented, Aug 17, 2020

@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'.

2reactions
skinny85commented, Mar 25, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

class S3DeployAction · AWS CDK
Deploys the sourceArtifact to Amazon S3. Example. const sourceOutput = new codepipeline.Artifact(); const targetBucket = new s3.Bucket( ...
Read more >
Amazon S3 deploy action - Amazon CodePipeline
You use an Amazon S3 deploy action to deploy files to an Amazon S3 bucket for static web site hosting or archive. You...
Read more >
AWS Code Pipeline with S3 Deployment from Github Repository
To follow along, you will need an SSL Certificate in us-east-1 region, ... Setting up a webhook is necessary to trigger the pipeline...
Read more >
Deploying Single Page App with AWS CDK V2
Let's define our github config and region preference, update the file on ... S3DeployAction({ actionName: 'Website', input: outputBuilds, ...
Read more >
amazon s3 - How to use codepipline to deploy to other region
Are you using the S3 Deploy action, by chance? What you want is a pipeline configured with an artifact bucket for each region...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found