First, zip up your function:
rm lambda.zip; zip -r lambda.zip lambda-function/*
Then, update the current working function:
aws lambda update-function-code --zip-file fileb://lambda.zip --function-name LambdaFunctionName
Next, publish the current working function, and capture the response:
aws lambda publish-version --function-name LambdaFunctionName > lambda_publish_response.json
Finally, run deploy-to-edge.js
. It will take the response found in lambda_publish_response.json
, and update the CloudFront Distribution specified to use the new version of the Lambda function.
@viki53 I'm glad I could help!