Skip to content

Commit

Permalink
Fix CodeDeploy sample to work in gov-cloud (#609)
Browse files Browse the repository at this point in the history
**Why?**

At the moment, the install script for CodeDeploy would install CodeDeploy using
the global S3 URL to fetch the file from the S3 bucket.

As such:
```
https://aws-codedeploy-${REGION}.s3.amazonaws.com/latest/install
```

However, the CodeDeploy Gov cloud buckets are not available through this
global URL. So when the REGION=`us-gov-east-1` or `us-gov-west-1` it would
fail.

**What?**

To fix this, we should use the regional URL instead:

```
https://aws-codedeploy-${REGION}.s3.${REGION}.amazonaws.com/latest/install
```
  • Loading branch information
sbkok authored Mar 17, 2023
1 parent bc5e5d4 commit 419ef58
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function platformize(){
function execute(){
if [ ${PLAT} = "ubuntu" ]; then
cd /tmp/
wget https://aws-codedeploy-${REGION}.s3.amazonaws.com/latest/install
wget https://aws-codedeploy-${REGION}.s3.${REGION}.amazonaws.com/latest/install
chmod +x ./install

if ./install auto; then
Expand All @@ -56,7 +56,7 @@ function execute(){

elif [ ${PLAT} = "amz" ]; then
cd /tmp/
wget https://aws-codedeploy-${REGION}.s3.amazonaws.com/latest/install
wget https://aws-codedeploy-${REGION}.s3.${REGION}.amazonaws.com/latest/install
chmod +x ./install

if ./install auto; then
Expand Down

0 comments on commit 419ef58

Please sign in to comment.