From 6bf4b90c90f15f4ab60833bddf5b5756d1a6b1f6 Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Thu, 2 Jul 2026 11:55:17 -0700 Subject: Init --- Homework/cs5260/publish_lambda.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Homework/cs5260/publish_lambda.sh (limited to 'Homework/cs5260/publish_lambda.sh') 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!" -- cgit v1.3