-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup-env.sh
26 lines (21 loc) · 1 KB
/
setup-env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
set -eu
STACK_NAME='GenerativeAiUseCasesStack'
function stack_output {
aws cloudformation describe-stacks \
--stack-name $STACK_NAME \
--query "Stacks[0].Outputs[?OutputKey=='$1'].OutputValue" \
--output text
}
echo 'Setup environment variables...'
export VITE_APP_API_ENDPOINT=`stack_output 'ApiEndpoint'`
export VITE_APP_REGION=`stack_output 'Region'`
export VITE_APP_USER_POOL_ID=`stack_output 'UserPoolId'`
export VITE_APP_USER_POOL_CLIENT_ID=`stack_output 'UserPoolClientId'`
export VITE_APP_IDENTITY_POOL_ID=`stack_output 'IdPoolId'`
export VITE_APP_PREDICT_STREAM_FUNCTION_ARN=`stack_output PredictStreamFunctionArn`
export VITE_APP_RAG_ENABLED=`stack_output RagEnabled`
export VITE_APP_SELF_SIGN_UP_ENABLED=`stack_output SelfSignUpEnabled`
export VITE_APP_SAGEMAKER_ENDPOINT_NAME=`stack_output SageMakerEndpointName`
export VITE_APP_SAGEMAKER_ENDPOINT_CONFIG_NAME=`stack_output SageMakerEndpointConfigName`
export VITE_APP_SAGEMAKER_MODELS=`stack_output SageMakerModels`