Skip to content

Commit

Permalink
not necessary to output to /dev/tty, is forbidden in lambda env (#2806)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenoir authored Jan 9, 2025
1 parent 8521802 commit ca01e4f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ echo "[${LAMBDA_EXTENSION_NAME}] Initialization"
get_secret() {
local secret_name=$1
local secret_value
echo "[${LAMBDA_EXTENSION_NAME}] Getting secret: $secret_name" > /dev/tty
echo "[${LAMBDA_EXTENSION_NAME}] Getting secret: $secret_name"

secret_value=$(aws secretsmanager get-secret-value --secret-id "$secret_name" --query SecretString --output text)
if [[ -z "$secret_value" ]]; then
echo "[${LAMBDA_EXTENSION_NAME}] Secret not found: $secret_name" > /dev/tty
echo "[${LAMBDA_EXTENSION_NAME}] Secret not found: $secret_name"
exit 1
fi
echo "$secret_value"
Expand Down

0 comments on commit ca01e4f

Please sign in to comment.