This repository was archived by the owner on Mar 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ LAYER_ZIP=swift-lambda-runtime-$(LAYER_VERSION).zip
3737LAMBDA_BUILD_PATH =./.build
3838IAM_ROLE_NAME =lambda_sprinter_basic_execution
3939DATETIME =$(shell date +'% y% m% d-% H% M% S')
40+ AWS_LAYER_BUCKET =aws-lambda-swift-sprinter-layers
4041
4142# use this for local development
4243MOUNT_ROOT =$(shell pwd) /..
@@ -140,6 +141,14 @@ package_layer: create_build_directory clean_layer
140141upload_build_to_s3 : create_lambda_s3_key
141142 aws s3 cp --acl public-read " $( LAMBDA_BUILD_PATH) /$( LAMBDA_ZIP) " s3://$(AWS_BUCKET ) /$(LAMBDA_S3_UPLOAD_PATH ) /$(LAMBDA_ZIP ) --profile $(AWS_PROFILE )
142143
144+ create_layer_s3_key :
145+ $(eval LAYER_S3_UPLOAD_PATH := $(SWIFT_LAMBDA_LIBRARY ) /$(DATETIME ) )
146+
147+ upload_lambda_layer_with_s3 : create_layer_s3_key
148+ aws s3 cp --acl public-read " $( LAMBDA_BUILD_PATH) /$( LAYER_ZIP) " s3://$(AWS_LAYER_BUCKET ) /$(LAYER_S3_UPLOAD_PATH ) /$(LAYER_ZIP ) --profile $(AWS_PROFILE )
149+ aws lambda publish-layer-version --layer-name $(SWIFT_LAMBDA_LIBRARY ) --description " AWS Custom Runtime Swift Shared Libraries with NIO" --content " S3Bucket=$( AWS_LAYER_BUCKET) ,S3Key=$( LAYER_S3_UPLOAD_PATH) /$( LAYER_ZIP) " --output text --query LayerVersionArn --profile $(AWS_PROFILE ) > $(LAMBDA_BUILD_PATH ) /$(SWIFT_LAMBDA_LIBRARY ) -arn.txt
150+ cat $(LAMBDA_BUILD_PATH ) /$(SWIFT_LAMBDA_LIBRARY ) -arn.txt
151+
143152upload_lambda_layer :
144153 aws lambda publish-layer-version --layer-name $(SWIFT_LAMBDA_LIBRARY ) --description " AWS Custom Runtime Swift Shared Libraries with NIO" --zip-file fileb://$(LAMBDA_BUILD_PATH ) /$(LAYER_ZIP ) --output text --query LayerVersionArn --profile $(AWS_PROFILE ) > $(LAMBDA_BUILD_PATH ) /$(SWIFT_LAMBDA_LIBRARY ) -arn.txt
145154 cat $(LAMBDA_BUILD_PATH ) /$(SWIFT_LAMBDA_LIBRARY ) -arn.txt
You can’t perform that action at this time.
0 commit comments