diff options
| author | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-07-02 11:55:17 -0700 |
|---|---|---|
| committer | Elizabeth Alexander Hunt <me@liz.coffee> | 2026-07-02 11:55:17 -0700 |
| commit | 6bf4b90c90f15f4ab60833bddf5b5756d1a6b1f6 (patch) | |
| tree | ed97e39ec77c5231ffd2c394493e68d00ddac5a4 /Homework/cs5260/publish_lambda.sh | |
| download | misc-undergrad-main.tar.gz misc-undergrad-main.zip | |
Diffstat (limited to 'Homework/cs5260/publish_lambda.sh')
| -rw-r--r-- | Homework/cs5260/publish_lambda.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Homework/cs5260/publish_lambda.sh b/Homework/cs5260/publish_lambda.sh new file mode 100644 index 0000000..e2ad000 --- /dev/null +++ b/Homework/cs5260/publish_lambda.sh @@ -0,0 +1,30 @@ +#!/bin/sh +export AWS_REGION=us-east-1 + +LAMBDA_NAME=widget-api-handler + +echo "building..." +cd widgetrequesthandler +bun run build.ts + +echo "zipping..." +cd dist +zip -r widgetrequesthandler.zip * + +echo "pushing to $LAMBDA_NAME..." +aws lambda update-function-code \ + --region $AWS_REGION \ + --function-name $LAMBDA_NAME \ + --zip-file fileb://widgetrequesthandler.zip \ + > /dev/null + +echo "setting env vars..." +export $(cat ../../.env | xargs) + +sleep 3 +aws lambda update-function-configuration \ + --function-name $LAMBDA_NAME \ + --environment "Variables={SOURCE_QUEUE=$SOURCE_QUEUE}" \ + > /dev/null + +echo "done!" |
