Skip to content

Commit

Permalink
Merge pull request #734 from anuruddhal/master
Browse files Browse the repository at this point in the history
Update layer versions
  • Loading branch information
anuruddhal authored Nov 26, 2024
2 parents f4f87b5 + 36202e1 commit 597e8bb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 26 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/add_reason_labels.yml

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/update-layer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-session-token: ${{ secrets.AWS_SESSION_TOKEN }}
aws-region: ${{ matrix.region }}
- name: Setup and Upload lambda Layer
id: setup
Expand Down
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 597e8bb

Please sign in to comment.