#!/usr/bin/env bash ## TODO: copy this file into env.sh with your settings export AWS_SDK_LOAD_CONFIG=1 # allows the SDK to load from config. see https://github.com/aws/aws-sdk-js/pull/1391 ## ==================================================================================================================== ## 1. the CloudFormation stack name, e.g. "MyAppName" ## ==================================================================================================================== export STACK_NAME=ExternalIdPDemo ## ==================================================================================================================== ## 2. explicitly define the account you intend to deploy into ## for the simplicity of running the demo, it takes the current profile's account and region ## in production make sure you explicitly define these via the CI/CD environment variables as a safety mechanism ## ==================================================================================================================== export STACK_ACCOUNT=$(aws sts get-caller-identity --query "Account" --output text) export STACK_REGION=$(aws configure get region) ## ==================================================================================================================== ## 3. change to any unused domain name, default to a combination that is be unique per account+region ## ==================================================================================================================== export COGNITO_DOMAIN_NAME=auth-${STACK_ACCOUNT}-${STACK_REGION} ## ==================================================================================================================== ## 4. set the frontend app URL (used as the CORS origin and Cognito callback URLs) ## choose one of the following options and comment out the others: ## ==================================================================================================================== ## -------------------------------------------------------------------------------------------------------------------- ## a. local mode: use this for development (the UI is not deployed and served locally) ## -------------------------------------------------------------------------------------------------------------------- export APP_URL=http://localhost:3000 ## -------------------------------------------------------------------------------------------------------------------- ## b. s3 mode: for development / demo purposes only. the UI will be deployed directly to s3 ## the APP_URL will be setup automatically based on the created bucket (will use a random name based on the stack name) ## -------------------------------------------------------------------------------------------------------------------- # export APP_FRONTEND_DEPLOY_MODE=s3 ## -------------------------------------------------------------------------------------------------------------------- ## c. cloudfront mode: the UI will be deployed to a private s3 bucket with a cloudfront distribution ## if not provided, the APP_URL will be determined automatically (the distribution URL) ## if you will be using a custom domain, explicitly set the APP_URL to the root of the app (e.g. https://example.com) ## -------------------------------------------------------------------------------------------------------------------- # export APP_FRONTEND_DEPLOY_MODE=cloudfront ## export APP_URL= ## ==================================================================================================================== ## 5. optional - for IdP integration ## ==================================================================================================================== ## the name you want for the Identity Provider # export IDENTITY_PROVIDER_NAME=IdP ## the IdPs SAML metadata URL, or the actual XML string # export IDENTITY_PROVIDER_METADATA= ## ==================================================================================================================== ## 6. other optional configuration ## ==================================================================================================================== # export GROUPS_ATTRIBUTE_NAME= # export ADMINS_GROUP_NAME= # export USERS_GROUP_NAME= # export LAMBDA_MEMORY=