-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from aws-samples/setup-env
ローカルで検証する時に自動で環境変数が入るように
- Loading branch information
Showing
6 changed files
with
52 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/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` |