Skip to content

Commit 9a617e4

Browse files
Merge pull request #214 from SumoLogic/sumo_254954
Updated NodeJs version 22.x for SAMs
2 parents f8e5632 + 1257d8c commit 9a617e4

23 files changed

+53
-56
lines changed

cloudwatchevents/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ First create an [HTTP collector endpoint](http://help.sumologic.com/Send_Data/So
1313
2. Select `Blank Function` on the select blueprint page
1414
3. Leave triggers empty for now, click next
1515
4. Configure Lambda
16-
* Select Node.js 18.x as runtime
16+
* Select Node.js 22.x as runtime
1717
* Copy code from cloudwatchevents.js into the Lambda function code.
1818
* Add Environment variables (See below)
1919
5. Scroll down to the `Lambda function handle and role` section, make sure you set the right values that match the function. For role, you can just use the basic execution role. Click next.

cloudwatchevents/guardduty/cloudwatchevents.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
]
8686
},
8787
"Timeout": 300,
88-
"Runtime": "nodejs18.x"
88+
"Runtime": "nodejs22.x"
8989
}
9090
},
9191
"CloudWatchEventFunctionCloudWatchEventTriggerPermission": {

cloudwatchevents/guardduty/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ else
1010
AWS_REGION="us-east-2"
1111
fi
1212

13-
version="1.0.5"
13+
version="1.0.6"
1414

1515
echo "Creating package.yaml"
1616
sam package --template-file template.yaml --s3-bucket $SAM_S3_BUCKET --output-template-file packaged.yaml --s3-prefix "GuardDuty/v"$version --region $AWS_REGION --profile $AWS_PROFILE

cloudwatchevents/guardduty/packaged.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ Metadata:
2323
- cloudwatchevents
2424
- guardduty
2525
Name: sumologic-guardduty-events-processor
26-
LicenseUrl: s3://appdevstore/GuardDuty/v1.0.5/6092dd6c323e33634657102f570628e0
27-
ReadmeUrl: s3://appdevstore/GuardDuty/v1.0.5/9d217c45b3ababadef584aee27d4d607
28-
SemanticVersion: 1.0.5
26+
LicenseUrl: s3://appdevstore/GuardDuty/v1.0.6/6092dd6c323e33634657102f570628e0
27+
ReadmeUrl: s3://appdevstore/GuardDuty/v1.0.6/9d217c45b3ababadef584aee27d4d607
28+
SemanticVersion: 1.0.6
2929
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/main/cloudwatchevents/guardduty
3030
SpdxLicenseId: Apache-2.0
3131
Parameters:
@@ -35,9 +35,9 @@ Resources:
3535
CloudWatchEventFunction:
3636
Type: AWS::Serverless::Function
3737
Properties:
38-
CodeUri: s3://appdevstore/GuardDuty/v1.0.5/22b7b226ca9ec3b9dbb28b94c0e5f824
38+
CodeUri: s3://appdevstore/GuardDuty/v1.0.6/22b7b226ca9ec3b9dbb28b94c0e5f824
3939
Handler: cloudwatchevents.handler
40-
Runtime: nodejs20.x
40+
Runtime: nodejs22.x
4141
Environment:
4242
Variables:
4343
SUMO_ENDPOINT:

cloudwatchevents/guardduty/template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Metadata:
2323
Name: sumologic-guardduty-events-processor
2424
LicenseUrl: ../LICENSE
2525
ReadmeUrl: ./README.md
26-
SemanticVersion: 1.0.5
26+
SemanticVersion: 1.0.6
2727
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/main/cloudwatchevents/guardduty
2828
SpdxLicenseId: Apache-2.0
2929

@@ -38,7 +38,7 @@ Resources:
3838
Properties:
3939
CodeUri: ../src/
4040
Handler: cloudwatchevents.handler
41-
Runtime: nodejs20.x
41+
Runtime: nodejs22.x
4242
Environment:
4343
Variables:
4444
SUMO_ENDPOINT: !Ref SumoEndpointUrl

cloudwatchevents/guarddutybenchmark/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ else
1111
AWS_REGION="us-east-2"
1212
fi
1313

14-
version="1.0.16"
14+
version="1.0.17"
1515

1616
echo "Creating package.yaml"
1717
sam package --template-file template_v2.yaml --s3-bucket $SAM_S3_BUCKET --output-template-file packaged.yaml --s3-prefix "guarddutybenchmark/v"$version --region $AWS_REGION --profile $AWS_PROFILE

cloudwatchevents/guarddutybenchmark/packaged.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ Metadata:
5353
- benchmark
5454
- guardduty
5555
Name: sumologic-guardduty-benchmark
56-
LicenseUrl: s3://appdevstore/guarddutybenchmark/v1.0.16/6092dd6c323e33634657102f570628e0
57-
ReadmeUrl: s3://appdevstore/guarddutybenchmark/v1.0.16/cab012d7fb7887671b751e6f5c0d2062
58-
SemanticVersion: 1.0.16
56+
LicenseUrl: s3://appdevstore/guarddutybenchmark/v1.0.17/6092dd6c323e33634657102f570628e0
57+
ReadmeUrl: s3://appdevstore/guarddutybenchmark/v1.0.17/cab012d7fb7887671b751e6f5c0d2062
58+
SemanticVersion: 1.0.17
5959
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/main/cloudwatchevents/guarddutybenchmark
6060
SpdxLicenseId: Apache-2.0
6161
Parameters:
@@ -81,12 +81,11 @@ Parameters:
8181
- de
8282
- eu
8383
- fed
84-
- in
8584
- jp
8685
- kr
8786
- us1
8887
- us2
89-
Description: Enter au, ca, de, eu, fed, in, jp, kr, us1 or us2
88+
Description: Enter au, ca, de, eu, fed, jp, kr, us1 or us2
9089
RemoveSumoResourcesOnDeleteStack:
9190
AllowedValues:
9291
- true
@@ -98,7 +97,7 @@ Parameters:
9897
Resources:
9998
CloudWatchEventFunction:
10099
Properties:
101-
CodeUri: s3://appdevstore/guarddutybenchmark/v1.0.16/22b7b226ca9ec3b9dbb28b94c0e5f824
100+
CodeUri: s3://appdevstore/guarddutybenchmark/v1.0.17/22b7b226ca9ec3b9dbb28b94c0e5f824
102101
Environment:
103102
Variables:
104103
SUMO_ENDPOINT:
@@ -113,7 +112,7 @@ Resources:
113112
- aws.guardduty
114113
Type: CloudWatchEvent
115114
Handler: cloudwatchevents.handler
116-
Runtime: nodejs20.x
115+
Runtime: nodejs22.x
117116
Type: AWS::Serverless::Function
118117
Metadata:
119118
SamResourceId: CloudWatchEventFunction
@@ -122,7 +121,7 @@ Resources:
122121
Properties:
123122
Location:
124123
ApplicationId: arn:aws:serverlessrepo:us-east-1:956882708938:applications/sumologic-app-utils
125-
SemanticVersion: 2.0.17
124+
SemanticVersion: 2.0.20
126125
Metadata:
127126
SamResourceId: SumoAppUtils
128127
SumoHostedCollector:

cloudwatchevents/guarddutybenchmark/template_v2.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Metadata:
5656
Name: sumologic-guardduty-benchmark
5757
LicenseUrl: ../LICENSE
5858
ReadmeUrl: ./README.md
59-
SemanticVersion: 1.0.16
59+
SemanticVersion: 1.0.17
6060
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/main/cloudwatchevents/guarddutybenchmark
6161
SpdxLicenseId: Apache-2.0
6262

@@ -83,12 +83,11 @@ Parameters:
8383
- de
8484
- eu
8585
- fed
86-
- in
8786
- jp
8887
- kr
8988
- us1
9089
- us2
91-
Description: "Enter au, ca, de, eu, fed, in, jp, kr, us1 or us2"
90+
Description: "Enter au, ca, de, eu, fed, jp, kr, us1 or us2"
9291
RemoveSumoResourcesOnDeleteStack:
9392
AllowedValues:
9493
- true
@@ -112,15 +111,15 @@ Resources:
112111
- aws.guardduty
113112
Type: CloudWatchEvent
114113
Handler: cloudwatchevents.handler
115-
Runtime: nodejs20.x
114+
Runtime: nodejs22.x
116115
Type: AWS::Serverless::Function
117116

118117
SumoAppUtils:
119118
Type: AWS::Serverless::Application
120119
Properties:
121120
Location:
122121
ApplicationId: arn:aws:serverlessrepo:us-east-1:956882708938:applications/sumologic-app-utils
123-
SemanticVersion: 2.0.17
122+
SemanticVersion: 2.0.20
124123

125124
SumoHostedCollector:
126125
Type: Custom::Collector
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
requests==2.32.3
2-
boto3==1.34.119
2+
boto3==1.36.11
33
sumologic-sdk==0.1.17

cloudwatchlogs-with-dlq/DLQLambdaCloudFormation.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
}
229229
},
230230
"Handler": "cloudwatchlogs_lambda.handler",
231-
"Runtime": "nodejs20.x",
231+
"Runtime": "nodejs22.x",
232232
"MemorySize": 128,
233233
"Environment": {
234234
"Variables": {
@@ -290,7 +290,7 @@
290290
]
291291
}
292292
},
293-
"Runtime": "nodejs20.x",
293+
"Runtime": "nodejs22.x",
294294
"MemorySize": 128,
295295
"Environment": {
296296
"Variables": {

cloudwatchlogs-with-dlq/DLQLambdaCloudFormationWithSecuredEndpoint.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
}
271271
},
272272
"Handler": "cloudwatchlogs_lambda.handler",
273-
"Runtime": "nodejs20.x",
273+
"Runtime": "nodejs22.x",
274274
"MemorySize": 128,
275275
"Environment": {
276276
"Variables": {
@@ -331,7 +331,7 @@
331331
]
332332
}
333333
},
334-
"Runtime": "nodejs20.x",
334+
"Runtime": "nodejs22.x",
335335
"MemorySize": 128,
336336
"Environment": {
337337
"Variables": {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
requests==2.32.2
2-
boto3==1.5.1
1+
requests==2.32.3
2+
boto3==1.36.11

cloudwatchlogs-with-dlq/test_cwl_lambda.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def setUp(self):
3535
self.template_data = self._parse_template(self.template_name)
3636
# replacing prod zipfile location to test zipfile location
3737
self.template_data = self.template_data.replace("appdevzipfiles", BUCKET_PREFIX)
38-
RUNTIME = "nodejs%s" % os.environ.get("NODE_VERSION", "20.x")
39-
self.template_data = self.template_data.replace("nodejs20.x", RUNTIME)
38+
RUNTIME = "nodejs%s" % os.environ.get("NODE_VERSION", "22.x")
39+
self.template_data = self.template_data.replace("nodejs22.x", RUNTIME)
4040

4141
def tearDown(self):
4242
if self.stack_exists(self.stack_name):
@@ -226,8 +226,7 @@ def upload_code_in_S3(region):
226226
s3 = boto3.client('s3', region)
227227
bucket_name = get_bucket_name(region)
228228
print("Uploading zip file %s in S3 bucket (%s) at region (%s)" % (filename, bucket_name, region))
229-
s3.upload_file(filename, bucket_name, f"cloudwatchLogsDLQ/{VERSION}/{filename}",
230-
ExtraArgs={'ACL': 'public-read'})
229+
s3.upload_file(filename, bucket_name, f"cloudwatchLogsDLQ/{VERSION}/{filename}")
231230

232231

233232
def generate_fixtures(region, count):
@@ -259,7 +258,7 @@ def prod_deploy():
259258
print("Uploading template file: %s in S3" % filename)
260259
s3.upload_file(filename, bucket_name, filename,
261260
ExtraArgs={'ACL': 'public-read'})
262-
print("Deployment Successfull: ALL files copied to Sumocontent")
261+
print("Deployment Successfully: ALL files copied to Sumocontent")
263262

264263

265264
if __name__ == '__main__':

loggroup-lambda-connector/sam/packaged.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ Metadata:
2121
- serverless
2222
- loggroups
2323
- cloudwatch
24-
LicenseUrl: s3://appdevstore/LoggroupConnector/v1.0.14/6092dd6c323e33634657102f570628e0
24+
LicenseUrl: s3://appdevstore/LoggroupConnector/v1.0.15/6092dd6c323e33634657102f570628e0
2525
Name: sumologic-loggroup-connector
26-
ReadmeUrl: s3://appdevstore/LoggroupConnector/v1.0.14/60b531a8a7a836857dd096ea058dc2c6
27-
SemanticVersion: 1.0.14
26+
ReadmeUrl: s3://appdevstore/LoggroupConnector/v1.0.15/15e6b49afe3116d3ff8861099b34b973
27+
SemanticVersion: 1.0.15
2828
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/main/loggroup-lambda-connector
2929
SpdxLicenseId: Apache-2.0
3030
Parameters:
@@ -107,9 +107,9 @@ Resources:
107107
SumoLogGroupLambdaConnector:
108108
Type: AWS::Serverless::Function
109109
Properties:
110-
CodeUri: s3://appdevstore/LoggroupConnector/v1.0.14/5a44aebff6ae18483b1b5d082d112e85
110+
CodeUri: s3://appdevstore/LoggroupConnector/v1.0.15/5a44aebff6ae18483b1b5d082d112e85
111111
Handler: loggroup-lambda-connector.handler
112-
Runtime: nodejs20.x
112+
Runtime: nodejs22.x
113113
Environment:
114114
Variables:
115115
DESTINATION_ARN:
@@ -202,7 +202,7 @@ Resources:
202202
\ console.log(responseData.Error + \":\\n\", err);\n }\n \n await response.send(event,\
203203
\ context, responseStatus, responseData);\n};\n"
204204
Handler: index.handler
205-
Runtime: nodejs20.x
205+
Runtime: nodejs22.x
206206
Environment:
207207
Variables:
208208
FUNCTION_NAME:

loggroup-lambda-connector/sam/sam_package.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ else
1010
AWS_REGION="us-east-2"
1111
fi
1212

13-
version="1.0.14"
13+
version="1.0.15"
1414

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

loggroup-lambda-connector/sam/template.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Metadata:
2424
LicenseUrl: ../LICENSE
2525
Name: sumologic-loggroup-connector
2626
ReadmeUrl: ../Readme.md
27-
SemanticVersion: 1.0.14
27+
SemanticVersion: 1.0.15
2828
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/main/loggroup-lambda-connector
2929
SpdxLicenseId: Apache-2.0
3030

@@ -99,7 +99,7 @@ Resources:
9999
Properties:
100100
CodeUri: ../src/
101101
Handler: "loggroup-lambda-connector.handler"
102-
Runtime: nodejs20.x
102+
Runtime: nodejs22.x
103103
Environment:
104104
Variables:
105105
DESTINATION_ARN: !Ref "DestinationArnValue"
@@ -193,7 +193,7 @@ Resources:
193193
await response.send(event, context, responseStatus, responseData);
194194
};
195195
Handler: "index.handler"
196-
Runtime: nodejs20.x
196+
Runtime: nodejs22.x
197197
Environment:
198198
Variables:
199199
FUNCTION_NAME: !Ref SumoLogGroupLambdaConnector
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
requests==2.32.2
1+
requests==2.32.3
22
boto3==1.34.119
33
cfn-flip>=1.3.0

loggroup-lambda-connector/test/test_loggroup_lambda_connector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_6_matching_existing_loggroup_by_tag_only(self):
8585
self.create_log_group_with_tag()
8686
self.create_stack(self.stack_name, self.template_data,
8787
self.create_stack_parameters("Kinesis","true", loggroup_pattern='^$',
88-
loggroup_tag='username=akhil'))
88+
loggroup_tag='team=apps'))
8989
print("Testing Stack Creation")
9090
self.assertTrue(self.stack_exists(self.stack_name))
9191
#self.invoke_lambda()
@@ -221,7 +221,7 @@ def upload_to_s3(file_path):
221221
bucket_name = get_bucket_name()
222222
key = os.path.basename(file_path)
223223
filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), file_path)
224-
s3.upload_file(os.path.join(__file__, filename), bucket_name, key, ExtraArgs={'ACL': 'public-read'})
224+
s3.upload_file(os.path.join(__file__, filename), bucket_name, key)
225225

226226

227227
def create_sam_package_and_upload():

sumologic-app-utils/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ rm sumo_app_utils.zip
3131

3232
./build.sh
3333

34-
version="2.0.19"
34+
version="2.0.20"
3535

3636
aws s3 cp sumo_app_utils.zip s3://$SAM_S3_BUCKET/sumo_app_utils/v"$version"/sumo_app_utils.zip --region $AWS_REGION --acl public-read
3737

sumologic-app-utils/packaged_sumo_app_utils.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ Metadata:
2020
- sumologic
2121
- serverless
2222
Name: sumologic-app-utils
23-
SemanticVersion: 2.0.19
23+
SemanticVersion: 2.0.20
2424
SourceCodeUrl: https://github.com/SumoLogic/sumologic-aws-lambda/tree/main/sumologic-app-utils
2525
SpdxLicenseId: Apache-2.0
26-
ReadmeUrl: s3://appdevstore/sumo_app_utils/v2.0.19/4d5a92c06a7fa9d956a900e51a1f6be4
26+
ReadmeUrl: s3://appdevstore/sumo_app_utils/v2.0.20/4d5a92c06a7fa9d956a900e51a1f6be4
2727
Resources:
2828
SumoAppUtilsFunction:
2929
Type: AWS::Serverless::Function
3030
Properties:
3131
Handler: main.handler
3232
Runtime: python3.13
33-
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.19/sumo_app_utils.zip
33+
CodeUri: s3://appdevstore/sumo_app_utils/v2.0.20/sumo_app_utils.zip
3434
MemorySize: 128
3535
Timeout: 300
3636
Policies:

sumologic-app-utils/src/sumoresource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def extract_params(self, event):
4444
def api_endpoint(self):
4545
if self.deployment == "us1":
4646
return "https://api.sumologic.com/api"
47-
elif self.deployment in ["ca", "au", "de", "eu", "jp", "us2", "fed", "in", 'kr']:
47+
elif self.deployment in ["ca", "au", "de", "eu", "jp", "us2", "fed", 'kr']:
4848
return "https://api.%s.sumologic.com/api" % self.deployment
4949
else:
5050
return 'https://%s-api.sumologic.net/api' % self.deployment

0 commit comments

Comments
 (0)