File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1616.PHONY : deploy
1717deploy :
1818 @echo " Packaging function..."
19- cd src && zip -r ../ function.zip *
19+ zip -r function.zip bootstrap handler.sh
2020 @echo " Deploying to $( FUNCTION_NAME) ..."
2121 aws lambda update-function-code \
2222 --function-name $(FUNCTION_NAME ) \
@@ -30,6 +30,7 @@ invoke:
3030 aws lambda invoke \
3131 --function-name $(FUNCTION_NAME ) \
3232 --payload ' {"test": "data"}' \
33+ --cli-binary-format raw-in-base64-out \
3334 /tmp/response.json
3435 @echo " Response:"
3536 @cat /tmp/response.json
Original file line number Diff line number Diff line change @@ -30,6 +30,12 @@ data "archive_file" "lambda_zip" {
3030 type = " zip"
3131 source_dir = local. source_dir
3232 output_path = " ${ path . module } /.terraform/tmp/${ module . this . id } .zip"
33+
34+ depends_on = [
35+ local_file . bootstrap_template ,
36+ local_file . handler_template ,
37+ local_file . makefile_template
38+ ]
3339}
3440
3541# IAM role for Lambda execution
You can’t perform that action at this time.
0 commit comments