Skip to content

Commit c244b12

Browse files
committed
fix(build): correct load_data.sh samconfig path and stack name
load_data.sh read samconfig.toml from unicorn_web/, but the file only exists at unicorn_web/infrastructure/web-service/samconfig.toml, so STACK_NAME always resolved empty and the subsequent describe-stacks call failed. Even fixing the path, samconfig's stack_name (uni-prop-<stage>-web) does not match what deploy-service actually creates (uni-prop-<stage>-web-service). Derived the stack name directly using the same STAGE/STACK_PREFIX convention the Makefile uses, rather than reading a disconnected config value.
1 parent 8849339 commit c244b12

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

unicorn_web/data/load_data.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
33
# SPDX-License-Identifier: MIT-0
44
ROOT_DIR="$(cd -- "$(dirname "$0")/../" >/dev/null 2>&1 ; pwd -P )"
5-
STACK_NAME="$(yq -ot '.default.global.parameters.stack_name' $ROOT_DIR/samconfig.toml)"
5+
STAGE="${STAGE:-local}"
6+
STACK_NAME="uni-prop-${STAGE}-web-service"
67

78
JSON_FILE="$ROOT_DIR/data/property_data.json"
89
echo "JSON_FILE: '${JSON_FILE}'"

0 commit comments

Comments
 (0)