Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
dimaryaz committed Feb 2, 2024
1 parent 6555221 commit 8039167
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-lambdas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Upload zips to Prod S3
run: |
s3_key="$(basename ${{ matrix.path }})/${{ github.sha }}.zip"
./lambdas/upload_zip.sh ./out.zip "$s3_key"
./lambdas/upload_zip.sh ./out.zip "$AWS_REGION" "$s3_key"
- name: Configure AWS credentials from GovCloud account
uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Upload zips to GovCloud S3
run: |
s3_key="$(basename ${{ matrix.path }})/${{ github.sha }}.zip"
./lambdas/upload_zip.sh ./out.zip "$s3_key"
./lambdas/upload_zip.sh ./out.zip "$AWS_REGION" "$s3_key"
deploy-lambda-ecr:
strategy:
Expand Down
6 changes: 3 additions & 3 deletions lambdas/upload_zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ error() {
exit 1
}

[[ $# == 2 ]] || error "Usage: $0 zip_file s3_key"
[[ $# == 3 ]] || error "Usage: $0 zip_file primary_region s3_key"

zip_file=$1
s3_key=$2
primary_region=$2
s3_key=$3

primary_region=$(aws configure get region) || error "Could not get primary region"
regions=$(aws ec2 describe-regions --query "Regions[].{Name:RegionName}" --output text)

echo "Uploading to $primary_region..."
Expand Down

0 comments on commit 8039167

Please sign in to comment.