-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_lambda_vars.sh
25 lines (16 loc) · 1.25 KB
/
update_lambda_vars.sh
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
#!/bin/bash
clear
echo "Set Lambda environment variables for GL_TIKTOK_SHOPIFY_DOCKER..."
# Read environment variables from .env file
export $(grep -v '^#' .env | xargs)
# Send environment variables to AWS Lambda
echo "Set Lambda environment variables for GL_TIKTOK_SHOPIFY_DOCKER..."
aws lambda update-function-configuration --function-name GL_TIKTOK_SHOPIFY_DOCKER --environment Variables="{TIKTOK_ACCESS_TOKEN=$TIKTOK_ACCESS_TOKEN,TIKTOK_PIXEL_ID=$TIKTOK_PIXEL_ID,TIKTOK_TEST_EVENT_CODE=$TIKTOK_TEST_EVENT_CODE,TIKTOK_API_VERSION=$TIKTOK_API_VERSION,ENV=$ENV}"
echo "Vars: $TIKTOK_ACCESS_TOKEN, $TIKTOK_PIXEL_ID, $TIKTOK_TEST_EVENT_CODE, $TIKTOK_API_VERSION, $ENV"
echo "Set Lambda environment variables for LOOD_TIKTOK_SHOPIFY_DOCKER..."
# Read environment variables from lood.env file
export $(grep -v '^#' lood.env | xargs)
# Send environment variables to AWS Lambda
aws lambda update-function-configuration --function-name LOOD_TIKTOK_SHOPIFY_DOCKER --environment Variables="{TIKTOK_ACCESS_TOKEN=$TIKTOK_ACCESS_TOKEN,TIKTOK_PIXEL_ID=$TIKTOK_PIXEL_ID,TIKTOK_TEST_EVENT_CODE=$TIKTOK_TEST_EVENT_CODE,TIKTOK_API_VERSION=$TIKTOK_API_VERSION,ENV=$ENV}"
echo "Vars: $TIKTOK_ACCESS_TOKEN, $TIKTOK_PIXEL_ID, $TIKTOK_TEST_EVENT_CODE, $TIKTOK_API_VERSION, $ENV"
echo "Done!"