Skip to content

Commit

Permalink
Merge pull request #154 from SumoLogic/hsharma-loggrp-connector
Browse files Browse the repository at this point in the history
Updating lambda runtime to nodeJS 16.x
  • Loading branch information
himsharma01 authored Sep 27, 2022
2 parents 90f280d + 18b71a2 commit 5cfffd6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 11 deletions.
22 changes: 16 additions & 6 deletions loggroup-lambda-connector/sam/packaged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ Metadata:
- serverless
- loggroups
- cloudwatch
LicenseUrl: s3://appdevstore/LoggroupConnector/v1.0.5/6092dd6c323e33634657102f570628e0
LicenseUrl: s3://appdevstore/LoggroupConnector/v1.0.6/6092dd6c323e33634657102f570628e0
Name: sumologic-loggroup-connector
ReadmeUrl: s3://appdevstore/LoggroupConnector/v1.0.5/5a9a6e956be7449cbd5f8653e4475071
SemanticVersion: 1.0.5
ReadmeUrl: s3://appdevstore/LoggroupConnector/v1.0.6/5a9a6e956be7449cbd5f8653e4475071
SemanticVersion: 1.0.6
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/loggroup-lambda-connector
SpdxLicenseId: Apache-2.0
Parameters:
Expand Down Expand Up @@ -107,9 +107,9 @@ Resources:
SumoLogGroupLambdaConnector:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://appdevstore/LoggroupConnector/v1.0.5/8cd9d2fd91333ef1c32307ccb5f6bbd3
CodeUri: s3://appdevstore/LoggroupConnector/v1.0.6/d8e8545bf4f818fdb41a52d27024bbcd
Handler: loggroup-lambda-connector.handler
Runtime: nodejs12.x
Runtime: nodejs16.x
Environment:
Variables:
DESTINATION_ARN:
Expand Down Expand Up @@ -150,6 +150,8 @@ Resources:
- logs.amazonaws.com
eventName:
- CreateLogGroup
Metadata:
SamResourceId: SumoLogGroupLambdaConnector
sumoIAMPassRolePolicy:
Type: AWS::IAM::Policy
Condition: create_pass_role
Expand All @@ -165,6 +167,8 @@ Resources:
Ref: RoleArn
Roles:
- Ref: SumoLogGroupLambdaConnectorRole
Metadata:
SamResourceId: sumoIAMPassRolePolicy
SumoCWLambdaInvokePermission:
Type: AWS::Lambda::Permission
Condition: create_invoke_permission
Expand All @@ -178,6 +182,8 @@ Resources:
Ref: AWS::AccountId
SourceArn:
Fn::Sub: arn:aws:logs:${AWS::Region}:${AWS::AccountId}:log-group:*:*
Metadata:
SamResourceId: SumoCWLambdaInvokePermission
SumoLogGroupExistingLambdaConnector:
Type: AWS::Serverless::Function
Condition: invoke_existing
Expand All @@ -194,7 +200,7 @@ Resources:
\ }\n response.send(event, context, responseStatus, responseData);\n\
\ });\n};\n"
Handler: index.handler
Runtime: nodejs12.x
Runtime: nodejs16.x
Environment:
Variables:
FUNCTION_NAME:
Expand All @@ -207,6 +213,8 @@ Resources:
- lambda:InvokeFunction
Resource:
- Fn::Sub: arn:aws:lambda:${AWS::Region}:${AWS::AccountId}:function:${SumoLogGroupLambdaConnector}
Metadata:
SamResourceId: SumoLogGroupExistingLambdaConnector
InvokeLambdaConnector:
Type: AWS::CloudFormation::CustomResource
Version: '1.0'
Expand All @@ -224,6 +232,8 @@ Resources:
Ref: LogGroupPattern
ROLE_ARN:
Ref: RoleArn
Metadata:
SamResourceId: InvokeLambdaConnector
Outputs:
SumoLogGroupLambdaConnector:
Description: SumoLogGroupLambdaConnector Function ARN
Expand Down
2 changes: 1 addition & 1 deletion loggroup-lambda-connector/sam/sam_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ else
AWS_REGION="us-east-2"
fi

version="1.0.4"
version="1.0.6"

sam package --template-file template.yaml --s3-bucket $SAM_S3_BUCKET --output-template-file packaged.yaml --s3-prefix "LoggroupConnector/v$version"

Expand Down
8 changes: 4 additions & 4 deletions loggroup-lambda-connector/sam/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Metadata:
- cloudwatch
LicenseUrl: ../LICENSE
Name: sumologic-loggroup-connector
ReadmeUrl: ../README.md
SemanticVersion: 1.0.5
ReadmeUrl: ../Readme.md
SemanticVersion: 1.0.6
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/loggroup-lambda-connector
SpdxLicenseId: Apache-2.0

Expand Down Expand Up @@ -99,7 +99,7 @@ Resources:
Properties:
CodeUri: ../src/
Handler: "loggroup-lambda-connector.handler"
Runtime: nodejs12.x
Runtime: nodejs16.x
Environment:
Variables:
DESTINATION_ARN: !Ref "DestinationArnValue"
Expand Down Expand Up @@ -190,7 +190,7 @@ Resources:
});
};
Handler: "index.handler"
Runtime: nodejs12.x
Runtime: nodejs16.x
Environment:
Variables:
FUNCTION_NAME: !Ref SumoLogGroupLambdaConnector
Expand Down

0 comments on commit 5cfffd6

Please sign in to comment.