Skip to content

Commit

Permalink
Update layer versions
Browse files Browse the repository at this point in the history
  • Loading branch information
anuruddhal committed Nov 26, 2024
1 parent 825d210 commit 36202e1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Generating executables
@aws.lambda:Function: echo, uuid, ctxinfo, notifySQS, notifyS3, notifyDynamoDB, notifySES, apigwRequest

Run the following command to deploy each Ballerina AWS Lambda function:
aws lambda create-function --function-name <FUNCTION_NAME> --zip-file fileb://aws-ballerina-lambda-functions.zip --handler functions.<FUNCTION_NAME> --runtime provided --role <LAMBDA_ROLE_ARN> --layers arn:aws:lambda:<REGION_ID>:134633749276:layer:ballerina-jre17:1
aws lambda create-function --function-name <FUNCTION_NAME> --zip-file fileb://aws-ballerina-lambda-functions.zip --handler functions.<FUNCTION_NAME> --runtime provided --role <LAMBDA_ROLE_ARN> --layers arn:aws:lambda:<REGION_ID>:367134611783:layer:ballerina-jre21:1

Run the following command to re-deploy an updated Ballerina AWS Lambda function:
aws lambda update-function-code --function-name <FUNCTION_NAME> --zip-file fileb://aws-ballerina-lambda-functions.zip
Expand Down
2 changes: 1 addition & 1 deletion ballerina/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Generating executable
@aws.lambda:Function: echo, uuid, ctxinfo, notifySQS, notifyS3

Run the following command to deploy each Ballerina AWS Lambda function:
aws lambda create-function --function-name $FUNCTION_NAME --zip-file fileb://aws-ballerina-lambda-functions.zip --handler functions.$FUNCTION_NAME --runtime provided --role $LAMBDA_ROLE_ARN --layers arn:aws:lambda:$REGION_ID:134633749276:layer:ballerina-jre17:1 --memory-size 512 --timeout 10
aws lambda create-function --function-name $FUNCTION_NAME --zip-file fileb://aws-ballerina-lambda-functions.zip --handler functions.$FUNCTION_NAME --runtime provided --role $LAMBDA_ROLE_ARN --layers arn:aws:lambda:$REGION_ID:367134611783:layer:ballerina-jre21:1 --memory-size 512 --timeout 10

Run the following command to re-deploy an updated Ballerina AWS Lambda function:
aws lambda update-function-code --function-name $FUNCTION_NAME --zip-file fileb://aws-ballerina-lambda-functions.zip
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ Resources:
CodeUri: aws-ballerina-lambda-functions.zip
Handler: functions.echo
Layers:
- arn:aws:lambda:us-west-1:134633749276:layer:ballerina-jre17:1
- arn:aws:lambda:us-west-1:367134611783:layer:ballerina-jre21:1
UUIDFunction:
Type: AWS::Serverless::Function
Properties:
Runtime: provided
CodeUri: aws-ballerina-lambda-functions.zip
Handler: functions.uuid
Layers:
- arn:aws:lambda:us-west-1:134633749276:layer:ballerina-jre17:1
- arn:aws:lambda:us-west-1:367134611783:layer:ballerina-jre21:1
CtxInfoFunction:
Type: AWS::Serverless::Function
Properties:
Runtime: provided
CodeUri: aws-ballerina-lambda-functions.zip
Handler: functions.ctxinfo
Layers:
- arn:aws:lambda:us-west-1:134633749276:layer:ballerina-jre17:1
- arn:aws:lambda:us-west-1:367134611783:layer:ballerina-jre21:1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void perform(CompilerLifecycleEventContext lifecycleEventContext) {
String version = getResourceFileAsString("layer-version.txt");
String fileName = executablePath.getFileName().toString();
String balxName = fileName.substring(0, fileName.lastIndexOf('.'));
String layer = " --layers arn:aws:lambda:$REGION_ID:134633749276:layer:ballerina-jre21:" + version;
String layer = " --layers arn:aws:lambda:$REGION_ID:367134611783:layer:ballerina-jre21:" + version;
if (isNative) {
layer = "";
}
Expand Down

0 comments on commit 36202e1

Please sign in to comment.