Skip to content

Commit ccfd358

Browse files
committed
Use s3 bucket to store lambda code
1 parent a43611f commit ccfd358

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sw*

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ inputs:
1212
lambda_function_name:
1313
description: The Lambda function name. Check the AWS docs/readme for examples.
1414
required: true
15+
s3_bucket:
16+
description: S3 bucket where upload lambda zip code.
17+
required: true
1518
code_path:
1619
description: Path to the code.
1720
required: false
@@ -24,6 +27,7 @@ runs:
2427
- ${{ inputs.lambda_layer_arn }}
2528
- ${{ inputs.lambda_function_name }}
2629
- ${{ inputs.code_path }}
30+
- ${{ inputs.s3_bucket }}
2731
branding:
2832
icon: 'layers'
2933
color: 'yellow'

entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ publish_dependencies_as_layer(){
2121
publish_function_code(){
2222
echo "Deploying the code itself..."
2323
zip -r code.zip . -x \*.git\*
24+
aws s3 cp code.zip s3://${INPUT_S3_BUCKET}/${INPUT_LAMBDA_FUNCTION_NAME}.zip
2425
aws lambda update-function-code --function-name "${INPUT_LAMBDA_FUNCTION_NAME}" --zip-file fileb://code.zip
2526
}
2627

0 commit comments

Comments
 (0)