From 0c6f7d5e636948085f8943ddba40abe13d3c9bd9 Mon Sep 17 00:00:00 2001 From: Ryan Block Date: Sat, 22 Feb 2025 13:24:29 -0800 Subject: [PATCH] Improve layer publishing error output --- scripts/publish-layer.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/publish-layer.js b/scripts/publish-layer.js index c4ee85a..e98ca24 100755 --- a/scripts/publish-layer.js +++ b/scripts/publish-layer.js @@ -8,6 +8,7 @@ let { AddLayerVersionPermissionCommand, PublishLayerVersionCommand, } = require('@aws-sdk/client-lambda') +let currentRegion try { async function main () { @@ -18,6 +19,7 @@ try { // Publish to each region let regions = await getRegions() for (let region of regions) { + currentRegion = region let lambda = new LambdaClient({ region }) let publish = new PublishLayerVersionCommand({ Content: { ZipFile }, @@ -43,6 +45,9 @@ try { main() } catch (err) { + if (currentRegion) { + console.error(`Publishing failed on ${currentRegion}`) + } console.error(err) process.exit(1) }