forked from marekq/rss-lambda
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
28 lines (22 loc) · 705 Bytes
/
Copy pathdeploy.sh
File metadata and controls
28 lines (22 loc) · 705 Bytes
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
28
#!/bin/bash
# @marekq
# www.marek.rocks
############################################################
# set cli color variables
RED='\033[0;31m'
NC='\033[0m'
# build the lambda package in a docker container
sam build --use-container --skip-pull-image
# validate the sam stack
echo -e "\n${RED} * Running SAM validate locally to test function... ${NC}\n"
sam validate
# deploy the sam stack to the aws region
echo -e "\n${RED} * Deploying the SAM stack to AWS... ${NC}\n"
# check if samconfig.toml file is present
if [ ! -f samconfig.toml ]; then
echo "no samconfig.toml found, starting guided deploy"
sam deploy -g
else
echo "samconfig.toml found, proceeding to deploy"
sam deploy
fi