This repository was archived by the owner on Jul 20, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -43,15 +43,15 @@ publish_custom_layers(){
4343 CUSTOM_LAYER_4_VERSION=$( jq ' .Version' <<< " $result" )
4444}
4545
46- publish_function(name ){
47- echo " Deploying the code for ${name } "
48- zip -r " ${name } " .zip " ${name } "
49- aws lambda update-function-code --function-name " ${name } " --zip-file fileb://" ${name } " .zip
46+ publish_function (){
47+ echo " Deploying the code for ${1 } "
48+ zip -r " ${1 } " .zip " ${1 } "
49+ aws lambda update-function-code --function-name " ${1 } " --zip-file fileb://" ${1 } " .zip
5050}
5151
52- update_function_layers(name ){
53- echo " Adding pip layer and custom layers to ${name } "
54- aws lambda update-function-configuration --function-name " ${name } " --layers " ${INPUT_PIP_LAYER_ARN} :${PIP_LAYER_VERSION} " " ${INPUT_CUSTOM_LAYER_1_ARN} :${CUSTOM_LAYER_1_VERSION} " " ${INPUT_CUSTOM_LAYER_2_ARN} :${CUSTOM_LAYER_2_VERSION} " " ${INPUT_CUSTOM_LAYER_3_ARN} :${CUSTOM_LAYER_3_VERSION} " " ${INPUT_CUSTOM_LAYER_4_ARN} :${CUSTOM_LAYER_4_VERSION} "
52+ update_function_layers (){
53+ echo " Adding pip layer and custom layers to ${1 } "
54+ aws lambda update-function-configuration --function-name " ${1 } " --layers " ${INPUT_PIP_LAYER_ARN} :${PIP_LAYER_VERSION} " " ${INPUT_CUSTOM_LAYER_1_ARN} :${CUSTOM_LAYER_1_VERSION} " " ${INPUT_CUSTOM_LAYER_2_ARN} :${CUSTOM_LAYER_2_VERSION} " " ${INPUT_CUSTOM_LAYER_3_ARN} :${CUSTOM_LAYER_3_VERSION} " " ${INPUT_CUSTOM_LAYER_4_ARN} :${CUSTOM_LAYER_4_VERSION} "
5555}
5656
5757deploy_lambda_function (){
@@ -62,8 +62,8 @@ deploy_lambda_function(){
6262
6363 functionNames=(${INPUT_LAMBDA_FUNCTION_NAMES// ,/ } )
6464 for name in ${functionNames[@]} ; do
65- publish_function( name)
66- update_function_layers( name)
65+ publish_function name
66+ update_function_layers name
6767 done
6868}
6969
You can’t perform that action at this time.
0 commit comments