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:
19
19
description : Path to the code.
20
20
required : false
21
21
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
22
29
runs :
23
30
using : ' docker'
24
31
image : ' Dockerfile'
28
35
- ${{ inputs.lambda_function_name }}
29
36
- ${{ inputs.code_path }}
30
37
- ${{ inputs.s3_bucket }}
38
+ - ${{ inputs.architectures }}
39
+ - ${{ inputs.runtimes }}
31
40
branding :
32
41
icon : ' layers'
33
42
color : ' yellow'
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ install_zip_dependencies(){
12
12
13
13
publish_dependencies_as_layer (){
14
14
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)
16
16
LAYER_VERSION=$( jq ' .Version' <<< " $result" )
17
17
rm -rf python
18
18
rm dependencies.zip
@@ -22,12 +22,12 @@ publish_function_code(){
22
22
echo " Deploying the code itself..."
23
23
zip -r code.zip . -x \* .git\*
24
24
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
26
26
}
27
27
28
28
update_function_layers (){
29
29
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} "
31
31
}
32
32
33
33
deploy_lambda_function (){
You can’t perform that action at this time.
0 commit comments