Skip to content

Commit

Permalink
Add single region publishing to publish script
Browse files Browse the repository at this point in the history
Update deps
  • Loading branch information
ryanblock committed Nov 7, 2023
1 parent 1152b0b commit 3aa98b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
"node": ">=12"
},
"devDependencies": {
"@architect/eslint-config": "~2.1.1",
"@aws-sdk/client-lambda": "~3.226.0",
"@aws-sdk/client-ssm": "~3.224.0",
"@architect/eslint-config": "~2.1.2",
"@aws-sdk/client-lambda": "~3.441.0",
"@aws-sdk/client-ssm": "~3.441.0",
"cross-env": "~7.0.3",
"eslint": "~8.31.0",
"eslint": "~8.53.0",
"nyc": "~15.1.0",
"tap-arc": "~0.3.5",
"tape": "~5.6.1",
"tiny-json-http": "~7.4.2"
"tap-arc": "~1.2.2",
"tape": "~5.7.2",
"tiny-json-http": "~7.5.1"
},
"eslintConfig": {
"extends": "@architect/eslint-config"
Expand Down
8 changes: 5 additions & 3 deletions scripts/lib.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
let { SSMClient, GetParametersByPathCommand } = require('@aws-sdk/client-ssm')

let { LAYER_NAME, PUBLISH_REGION } = process.env
let LayerName = LAYER_NAME ? LAYER_NAME : 'begin-telemetry'

async function getRegions () {
if (PUBLISH_REGION) return [ PUBLISH_REGION ]

// Get the list of Lambda regions, filtering out Govcloud + CN
let Path = '/aws/service/global-infrastructure/services/lambda/regions'
let ssm = new SSMClient({ region: 'us-west-1' })
Expand All @@ -23,9 +28,6 @@ async function getRegions () {
return regions
}

let { LAYER_NAME } = process.env
let LayerName = LAYER_NAME ? LAYER_NAME : 'begin-telemetry'

module.exports = {
getRegions,
LayerName,
Expand Down

0 comments on commit 3aa98b3

Please sign in to comment.