mirror of
https://github.com/aljazceru/payments-rest-api.git
synced 2026-01-17 04:24:24 +01:00
fly poc
This commit is contained in:
30
lambda/dev/deploy.sh
Normal file
30
lambda/dev/deploy.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Variables
|
||||
FUNCTION_NAME="BreezLambda" # Match the FunctionName in CloudFormation
|
||||
ZIP_FILE="lambda.zip"
|
||||
|
||||
# Install dependencies
|
||||
echo "Installing dependencies..."
|
||||
mkdir -p package
|
||||
pip install -r requirements.txt -t package/
|
||||
|
||||
# Package the function
|
||||
echo "Packaging the function..."
|
||||
cp lambda_function.py package/
|
||||
cd package
|
||||
zip -r ../$ZIP_FILE .
|
||||
cd ..
|
||||
|
||||
# Update Lambda function code directly
|
||||
echo "Updating Lambda function code..."
|
||||
aws lambda update-function-code \
|
||||
--function-name $FUNCTION_NAME \
|
||||
--zip-file fileb://$ZIP_FILE
|
||||
|
||||
# Clean up
|
||||
rm -rf package
|
||||
rm $ZIP_FILE
|
||||
|
||||
echo "Deployment complete!"
|
||||
|
||||
Reference in New Issue
Block a user