0
votes

I have AWS instances in several regions (us-east-1, us-west-2). I use CodeDeploy to take .zip files stored in S3 and deploy them to AutoScale groups. However, since the S3 bucket only exists in us-east-1, and I am attempting to deploy to us-west-2, specifying a region in my PowerShell commandlet (New-CDDeployment) doesn't work.

I need to specify a region (us-west-2), but pull the files from the S3 bucket in us-east-1 by using a custom endpoint (s3-us-east-1.amazonaws.com), but I cannot find any way of doing this within the PowerShell commandlet.

1
Looking at New-CDDeployment docs, haven't tried this personally but agree that the way it reads, this seems tricky. As a workaround, can you simply use cross-region replication to replicate your bucket from us-east-1 into us-west-2, and reference the replica bucket in your powershell cmdlet? - Anthony Neace
Use your powershell to call the .NET API !!!! aws.amazon.com/articles/3801 - mootmoot
Additional note: Cross-region replication might be a good thing to do either way, so that your code isn't unavailable during S3 us-east-1 outages. :) - Anthony Neace

1 Answers

1
votes

Use cross-region replication to replicate your bucket from us-east-1 into us-west-2, and reference the replica bucket in your powershell cmdlet since it will be in the same region.

Even if you didn't have this issue, this would be a good general practice so that you don't lose access to your code on S3 during us-east-1 S3 outages.