diff --git a/scripts/publish_layers.sh b/scripts/publish_layers.sh index 926d0f09..12546350 100755 --- a/scripts/publish_layers.sh +++ b/scripts/publish_layers.sh @@ -136,6 +136,9 @@ for region in $REGIONS do echo "Starting publishing layers for region $region..." for layer_name in "${LAYERS[@]}"; do + if [ ! -z "$SUFFIX" ]; then + layer_name+="-$SUFFIX" + fi latest_version=$(aws lambda list-layer-versions --region $region --layer-name "${layer_name}" --query 'LayerVersions[0].Version || `0`') if [ $latest_version -ge $VERSION ]; then echo "Layer $layer_name version $VERSION already exists in region $region, skipping..." diff --git a/scripts/publish_sandbox.sh b/scripts/publish_sandbox.sh index b58b0143..3af3dc19 100755 --- a/scripts/publish_sandbox.sh +++ b/scripts/publish_sandbox.sh @@ -31,6 +31,10 @@ if [ "$ARCHITECTURE" == "arm64" ]; then LAYER_NAME="Datadog-Extension-ARM" fi +if [ ! -z "$SUFFIX" ]; then + LAYER_NAME+="-$SUFFIX" +fi + REGION="sa-east-1" if [ "$RELEASE_CANDIDATE" == "true" ]; then echo "Will publish as a release candidate to us-east-1"