Skip to content

Instantly share code, notes, and snippets.

@josefaidt
Last active December 8, 2022 22:31
Show Gist options
  • Save josefaidt/a8cd6071d250693fdae73c84bc5b23f7 to your computer and use it in GitHub Desktop.
Save josefaidt/a8cd6071d250693fdae73c84bc5b23f7 to your computer and use it in GitHub Desktop.
Minimal Amplify CLI headless init script
#!/bin/bash
set -e
IFS='|'
AMPLIFY_ENVIRONMENT='dev'
AWS_REGION='us-east-1'
AWSCLOUDFORMATIONCONFIG="{\
\"configLevel\":\"project\",\
\"useProfile\":true,\
\"profileName\":\"default\",\
\"region\":\"$AWS_REGION\"\
}"
AMPLIFY="{\
\"envName\":\"$AMPLIFY_ENVIRONMENT\",\
}"
PROVIDERS="{\
\"awscloudformation\":$AWSCLOUDFORMATIONCONFIG}"
amplify init \
--amplify $AMPLIFY \
--providers $PROVIDERS \
--yes || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment