This repository has been archived by the owner on Sep 8, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update deployment scripts for multiple PHP version layers
- Loading branch information
Showing
4 changed files
with
30 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
PHP71_REGIONS=( | ||
PHP_REGIONS=( | ||
ap-northeast-1 | ||
ap-northeast-2 | ||
ap-south-1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
#!/bin/bash -e | ||
|
||
VERSION=$1 | ||
PHP_VERSION="${1}" | ||
LAYER_VERSION="${2}" | ||
|
||
source regions.sh | ||
|
||
MD5SUM=$(md5 -q php71.zip) | ||
S3KEY="php71/${MD5SUM}" | ||
LAYER="php${PHP_VERSION//.}" | ||
MD5SUM=$(md5 -q "${LAYER}.zip") | ||
S3KEY="${LAYER}/${MD5SUM}" | ||
|
||
for region in "${PHP71_REGIONS[@]}"; do | ||
for region in "${PHP_REGIONS[@]}"; do | ||
bucket_name="stackery-layers-${region}" | ||
|
||
echo "Deleting Lambda Layer php71 version ${VERSION} in region ${region}..." | ||
aws --region $region lambda delete-layer-version --layer-name php71 --version-number $VERSION > /dev/null | ||
echo "Deleted Lambda Layer php71 version ${VERSION} in region ${region}" | ||
echo "Deleting Lambda Layer ${LAYER} version ${VERSION} in region ${region}..." | ||
aws --region $region lambda delete-layer-version --layer-name ${LAYER} --version-number $VERSION > /dev/null | ||
echo "Deleted Lambda Layer ${LAYER} version ${VERSION} in region ${region}" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters