Skip to content

Commit

Permalink
fix(helpers): Remove hard-coded us-east-2 region
Browse files Browse the repository at this point in the history
Remove hard-coded AWS Region from the add-lcc-script helper, to use
the user's configured AWS region by default instead.
  • Loading branch information
athewsey committed Jul 6, 2023
1 parent 05df118 commit 04784aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions add-lcc-script.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#!/bin/bash
# Registers a Lifecycle Configuration Script using the AWS CLI
# NOTE: This registration by itself will not attach or enable it for any domains/users yet

set -eux

export LCC_SCRIPT_NAME='set-proxy'
export SCRIPT_FILE_NAME='scripts/set-proxy-settings/on-jupyter-server-start.sh'
export SCRIPT_TYPE="JupyterServer"
# export SCRIPT_TYPE="KernelGateway"
export SCRIPT_TYPE='JupyterServer'
# export SCRIPT_TYPE='KernelGateway'

LCC_CONTENT=`openssl base64 -A -in ${SCRIPT_FILE_NAME}`

aws sagemaker --region us-east-2 create-studio-lifecycle-config \
aws sagemaker create-studio-lifecycle-config \
--studio-lifecycle-config-name $LCC_SCRIPT_NAME \
--studio-lifecycle-config-content $LCC_CONTENT \
--studio-lifecycle-config-app-type $SCRIPT_TYPE

0 comments on commit 04784aa

Please sign in to comment.