Skip to content

Commit

Permalink
use default aws region locally
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Pickering <[email protected]>
  • Loading branch information
alexvpickering committed Jun 28, 2023
1 parent b1778aa commit 4154e4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions local-runner/cf-local-container-launcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Resources:
f"--name {event['name']}-{random_string(10)}",
f"{'-d' if event['detached'] else ''}",
f"--env ACTIVITY_ARN={event.get('activityArn', '')}",
f"--env AWS_DEFAULT_REGION=__AWS_DEFAULT_REGION__",
f"--env HOST_IP=__HOST_IP__",
f"--env DEBUG_STEP=__DEBUG_STEP__",
f"--env DEBUG_PATH=__DEBUG_PATH__",
Expand Down
4 changes: 2 additions & 2 deletions local-runner/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const validPipelineTypes = ['qc', 'gem2s', 'subset', 'seurat', 'copy'];
const isPipelineContainer = (name) => validPipelineTypes.some((keyword) => name.includes(keyword));

const setVarsInTemplate = (template) => {
const varNames = ['DEBUG_STEP', 'DEBUG_PATH', 'HOST_IP'];
const varNames = ['DEBUG_STEP', 'DEBUG_PATH', 'HOST_IP', 'AWS_DEFAULT_REGION'];
for (let ii = 0; ii < varNames.length; ii += 1) {
const value = process.env[varNames[ii]] || '';
const replace = `__${varNames[ii]}__`;
Expand All @@ -33,7 +33,7 @@ const initStack = async () => {

console.log('Creating mock Lambda function on InfraMock...');
const cf = new AWS.CloudFormation({
region: 'eu-west-1',
region: process.env.AWS_DEFAULT_REGION || 'eu-west-1',
});

const stackName = {
Expand Down

0 comments on commit 4154e4a

Please sign in to comment.