Skip to content
This repository was archived by the owner on Jul 20, 2024. It is now read-only.

Commit f80396e

Browse files
author
Pete
authored
Merge pull request #5 from seattleagainstslavery/feature/add_support_for_multiple_layers_and_functions
trying to fix endpoint error
2 parents 70bb5ef + dae599d commit f80396e

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

entrypoint.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,40 @@ publish_dependencies_as_layer(){
2323

2424
publish_custom_layers(){
2525
echo "Publishing custom layer 1"
26-
zip -r custom_layer_1.zip "${INPUT_CUSTOM_LAYER_1_PATH}"
26+
cd "${INPUT_CUSTOM_LAYER_1_PATH}"
27+
zip -r custom_layer_1.zip .
2728
local result=$(aws lambda publish-layer-version --layer-name "${INPUT_CUSTOM_LAYER_1_ARN}" --zip-file fileb://custom_layer_1.zip)
2829
CUSTOM_LAYER_1_VERSION=$(jq '.Version' <<< "$result")
30+
cd ..
2931

3032
echo "Publishing custom layer 2"
31-
zip -r custom_layer_2.zip "${INPUT_CUSTOM_LAYER_2_PATH}"
33+
cd "${INPUT_CUSTOM_LAYER_2_PATH}"
34+
zip -r custom_layer_2.zip .
3235
local result=$(aws lambda publish-layer-version --layer-name "${INPUT_CUSTOM_LAYER_2_ARN}" --zip-file fileb://custom_layer_2.zip)
3336
CUSTOM_LAYER_2_VERSION=$(jq '.Version' <<< "$result")
37+
cd ..
3438

3539
echo "Publishing custom layer 3"
36-
zip -r custom_layer_3.zip "${INPUT_CUSTOM_LAYER_3_PATH}"
40+
cd "${INPUT_CUSTOM_LAYER_3_PATH}"
41+
zip -r custom_layer_3.zip .
3742
local result=$(aws lambda publish-layer-version --layer-name "${INPUT_CUSTOM_LAYER_3_ARN}" --zip-file fileb://custom_layer_3.zip)
3843
CUSTOM_LAYER_3_VERSION=$(jq '.Version' <<< "$result")
44+
cd ..
3945

4046
echo "Publishing custom layer 4"
41-
zip -r custom_layer_4.zip "${INPUT_CUSTOM_LAYER_4_PATH}"
47+
cd "${INPUT_CUSTOM_LAYER_4_PATH}"
48+
zip -r custom_layer_4.zip .
4249
local result=$(aws lambda publish-layer-version --layer-name "${INPUT_CUSTOM_LAYER_4_ARN}" --zip-file fileb://custom_layer_4.zip)
4350
CUSTOM_LAYER_4_VERSION=$(jq '.Version' <<< "$result")
51+
cd ..
4452
}
4553

4654
publish_function(){
4755
echo "Deploying the code for ${1}"
48-
zip -r "${1}".zip "${1}"
56+
cd "${1}"
57+
zip -r "${1}".zip .
4958
aws lambda update-function-code --function-name "${1}" --zip-file fileb://"${1}".zip
59+
cd ..
5060
}
5161

5262
update_function_layers(){

0 commit comments

Comments
 (0)