Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit c94a44b

Browse files
authored
Merge pull request #36 from gockle/main
Update Nodejs Runtimes for all lambda functions to 18
2 parents 38aa57c + c86165a commit c94a44b

File tree

13 files changed

+936
-901
lines changed

13 files changed

+936
-901
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

88

9+
## [2.0.9] - 2024-01-07
10+
11+
### Changed
12+
13+
- Update NodeJS runtimes to Nodejs18.x for all the lambda functions in the solution.
14+
915
## [2.0.8] - 2023-10-31
1016

1117
### Changed
@@ -20,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2026

2127
### Changed
2228

23-
- Update aws-cdk-lib to force CustomResourceProvider and Provider to update lambda runtimes to Nodejs18.x.
29+
- Update aws-cdk-lib to force CustomResourceProvider and Provider to update lambda runtime to Nodejs18.x.
2430

2531
## [2.0.6] - 2023-06-27
2632

solution-manifest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: SO0134 # Solution Id
33
name: automations-for-aws-firewall-manager # trademarked name
4-
version: v2.0.8 # current version of the solution. Used to verify template headers
4+
version: v2.0.9 # current version of the solution. Used to verify template headers
55
regions: # List of supported regions per partition -or- `all` for all regions in partition
66
commercial:
77
- all # All the commercial regions; otherwise provide a list of regions
@@ -15,4 +15,4 @@ cloudformation_templates: # This list should match with AWS CloudFormation templ
1515
- template: aws-fms-compliance.template
1616
- template: aws-fms-demo.template
1717
build_environment:
18-
build_image: 'aws/codebuild/standard:7.0' # Options include: 'aws/codebuild/standard:5.0','aws/codebuild/standard:6.0','aws/codebuild/standard:7.0','aws/codebuild/amazonlinux2-x86_64-standard:4.0','aws/codebuild/amazonlinux2-x86_64-standard:5.0'
18+
build_image: 'aws/codebuild/standard:7.0'

source/resources/__tests__/prereq.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ describe("==Pre-requisite Stack Tests==", () => {
1313
test("has helper, pre-req and provider lambda functions", () => {
1414
expect(stack).toCountResources("AWS::Lambda::Function", 4);
1515
});
16-
test("lambda function has nodejs16 runtime", () => {
16+
test("lambda function has nodejs18 runtime", () => {
1717
expect(stack).toHaveResourceLike("AWS::Lambda::Function", {
18-
Runtime: "nodejs16.x",
18+
Runtime: "nodejs18.x",
1919
});
2020
});
2121
test("has custom resource for launch", () => {

source/resources/lib/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export class CommonResourceStack extends Stack {
144144
"Solution",
145145
"SolutionId"
146146
)} - Function to help with FMS solution installation (DO NOT DELETE)`,
147-
runtime: Runtime.NODEJS_16_X,
147+
runtime: Runtime.NODEJS_18_X,
148148
code: Code.fromAsset(
149149
`${path.dirname(__dirname)}/../services/helper/dist/helperFunction.zip`
150150
),
@@ -279,7 +279,7 @@ export class CommonResourceStack extends Stack {
279279
"Solution",
280280
"SolutionId"
281281
)} - Function to publish FMS solution metrics to aws-solutions`,
282-
runtime: Runtime.NODEJS_16_X,
282+
runtime: Runtime.NODEJS_18_X,
283283
code: Code.fromAsset(
284284
`${path.dirname(
285285
__dirname

source/resources/lib/compliance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ export class ComplianceGeneratorStack extends NestedStack {
232232
"ComplianceGenerator",
233233
{
234234
description: `${manifest.solution.primarySolutionId} - Function to generate compliance reports for FMS policies`,
235-
runtime: Runtime.NODEJS_16_X,
235+
runtime: Runtime.NODEJS_18_X,
236236
deadLetterQueue: dlq,
237237
code: Code.fromAsset(
238238
`${path.dirname(

source/resources/lib/demo.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-License-Identifier: Apache-2.0
33

44
import { App, CfnResource, Stack, StackProps } from "aws-cdk-lib";
5-
import { Vpc, SecurityGroup, Peer, Port } from "aws-cdk-lib/aws-ec2";
5+
import { Vpc, SecurityGroup, Peer, Port, IpAddresses, ISubnet } from "aws-cdk-lib/aws-ec2";
66
import manifest from "./solution_manifest.json";
77
const {
88
CloudFrontToS3,
@@ -38,11 +38,11 @@ export class DemoStack extends Stack {
3838
* Security Groups
3939
*/
4040
const vpc = new Vpc(this, "test-VPC", {
41-
cidr: "10.0.0.0/16",
41+
ipAddresses: IpAddresses.cidr("10.0.0.0/16"),
4242
});
4343

44-
vpc.publicSubnets.forEach((s) => {
45-
const cfnSubnet = s.node.defaultChild as CfnResource;
44+
vpc.publicSubnets.forEach((subnet: ISubnet) => {
45+
const cfnSubnet = subnet.node.defaultChild as CfnResource;
4646
cfnSubnet.addPropertyOverride("MapPublicIpOnLaunch", false);
4747
});
4848

source/resources/lib/prereq.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class PreReqStack extends Stack {
105105
*/
106106
const helperFunction: Function = new Function(this, "FMSHelperFunction", {
107107
description: "DO NOT DELETE - FMS helper function",
108-
runtime: Runtime.NODEJS_16_X,
108+
runtime: Runtime.NODEJS_18_X,
109109
code: Code.fromAsset(
110110
`${path.dirname(__dirname)}/../services/helper/dist/helperFunction.zip`
111111
),
@@ -160,7 +160,7 @@ export class PreReqStack extends Stack {
160160
{
161161
description:
162162
"Function to validate and install pre-requisites for the FMS solution",
163-
runtime: Runtime.NODEJS_16_X,
163+
runtime: Runtime.NODEJS_18_X,
164164
code: Code.fromAsset(
165165
`${path.dirname(
166166
__dirname

0 commit comments

Comments
 (0)