File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ inputs:
1919 description : Path to the code.
2020 required : false
2121 default : ' ./'
22+ architectures :
23+ description : Target architectures
24+ required : false
25+ default : ' x86_64'
26+ runtimes :
27+ description : Compatible runtimes in space-separated string
28+ required : true
2229runs :
2330 using : ' docker'
2431 image : ' Dockerfile'
2835 - ${{ inputs.lambda_function_name }}
2936 - ${{ inputs.code_path }}
3037 - ${{ inputs.s3_bucket }}
38+ - ${{ inputs.architectures }}
39+ - ${{ inputs.runtimes }}
3140branding :
3241 icon : ' layers'
3342 color : ' yellow'
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ install_zip_dependencies(){
1212
1313publish_dependencies_as_layer (){
1414 echo " Publishing dependencies as a layer..."
15- local result=$( aws lambda publish-layer-version --layer-name " ${INPUT_LAMBDA_LAYER_ARN} " --zip-file fileb://dependencies.zip)
15+ local result=$( aws lambda publish-layer-version --layer-name " ${INPUT_LAMBDA_LAYER_ARN} " --compatible-runtimes " ${INPUT_RUNTIMES} " --compatible-architectures " ${INPUT_ARCHITECTURES} " -- zip-file fileb://dependencies.zip)
1616 LAYER_VERSION=$( jq ' .Version' <<< " $result" )
1717 rm -rf python
1818 rm dependencies.zip
@@ -22,12 +22,12 @@ publish_function_code(){
2222 echo " Deploying the code itself..."
2323 zip -r code.zip . -x \* .git\*
2424 aws s3 cp code.zip s3://${INPUT_S3_BUCKET} /${INPUT_LAMBDA_FUNCTION_NAME} .zip
25- aws lambda update-function-code --function-name " ${INPUT_LAMBDA_FUNCTION_NAME} " --zip-file fileb://code.zip
25+ aws lambda update-function-code --architectures " ${INPUT_ARCHITECTURES} " -- function-name " ${INPUT_LAMBDA_FUNCTION_NAME} " --zip-file fileb://code.zip
2626}
2727
2828update_function_layers (){
2929 echo " Using the layer in the function..."
30- aws lambda update-function-configuration --function-name " ${INPUT_LAMBDA_FUNCTION_NAME} " --layers " ${INPUT_LAMBDA_LAYER_ARN} :${LAYER_VERSION} "
30+ aws lambda update-function-configuration --function-name " ${INPUT_LAMBDA_FUNCTION_NAME} " --runtime " ${INPUT_RUNTIMES %% * } " -- layers " ${INPUT_LAMBDA_LAYER_ARN} :${LAYER_VERSION} "
3131}
3232
3333deploy_lambda_function (){
You can’t perform that action at this time.
0 commit comments