diff --git a/.github/workflows/deploy-lambdas.yml b/.github/workflows/deploy-lambdas.yml index 8723c0bd88e..5cc3e7f2e89 100644 --- a/.github/workflows/deploy-lambdas.yml +++ b/.github/workflows/deploy-lambdas.yml @@ -50,7 +50,7 @@ jobs: aws-region: us-east-1 - name: Upload zips to Prod S3 run: | - s3_key="$(basename "$PWD")/${{ github.sha }}.zip" + s3_key="$(basename ${{ matrix.path }})/${{ github.sha }}.zip" ./lambdas/upload_zip.sh ./out.zip "$s3_key" - name: Configure AWS credentials from GovCloud account uses: aws-actions/configure-aws-credentials@v4 @@ -59,7 +59,7 @@ jobs: aws-region: us-gov-east-1 - name: Upload zips to GovCloud S3 run: | - s3_key="$(basename "$PWD")/${{ github.sha }}.zip" + s3_key="$(basename ${{ matrix.path }})/${{ github.sha }}.zip" ./lambdas/upload_zip.sh ./out.zip "$s3_key" deploy-lambda-ecr: diff --git a/lambdas/upload_zip.sh b/lambdas/upload_zip.sh index 7822efdff8f..5c289228194 100755 --- a/lambdas/upload_zip.sh +++ b/lambdas/upload_zip.sh @@ -12,7 +12,7 @@ error() { zip_file=$1 s3_key=$2 -primary_region=$(aws configure get region) +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..."