Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
27 lines (27 loc) · 982 Bytes

File metadata and controls

executable file
·
27 lines (27 loc) · 982 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
27
#!/bin/bash
set -eo pipefail
if [[ $# -gt 1 ]]; then
TEMPLATE_NAME=$1
shift
OVERRIDES="$@"
OVERRIDES_ARG="--parameter-overrides ${OVERRIDES}"
TEMPLATE=$(cat ${TEMPLATE_NAME}.yml)
elif [[ $# -eq 1 ]]; then
TEMPLATE_NAME=$1
TEMPLATE=$(cat ${TEMPLATE_NAME}.yml)
if [[ "$TEMPLATE" =~ PLACEHOLDER ]]; then
echo "Usage: ./create-stack.sh <template-name> <parameters>"
echo "e.g. ./create-stack.sh my-template parameter=value parameter2=value2"
exit 0
fi
else
echo "Usage: ./create-stack.sh <template-name> <parameters>"
echo "e.g. ./create-stack.sh function-inline"
echo "e.g. ./create-stack.sh my-template parameter=value parameter2=value2"
exit 0
fi
STACK_NAME=lambda-${TEMPLATE_NAME}
if [[ "$TEMPLATE" =~ "AWS::IAM::Role" ]]; then
CAPA_ARG="--capabilities CAPABILITY_NAMED_IAM"
fi
aws cloudformation deploy --template-file ${TEMPLATE_NAME}.yml --stack-name ${STACK_NAME} ${CAPA_ARG} ${OVERRIDES_ARG}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.