Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodejs22 update #1256

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
${{ runner.OS }}-
- name: Install Node.js modules
run: |
npm install -g pnpm@8.9.0
npm install -g pnpm@10.4.1
pnpm recursive install --frozen-lockfile
- name: Build all workspaces
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
${{ runner.OS }}-
- name: Install Node.js modules
run: |
npm install -g pnpm@8.9.0
npm install -g pnpm@10.4.1
pnpm install --frozen-lockfile
- name: Analyze TypeScript files
run: |
Expand All @@ -53,7 +53,7 @@ jobs:
${{ runner.OS }}-
- name: Install Node.js modules
run: |
npm install -g pnpm@8.9.0
npm install -g pnpm@10.4.1
pnpm install --frozen-lockfile
- name: Analyze TypeScript files
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
node-version: 18
- name: Install pnpm
run: |
npm install -g pnpm@8.9.0
npm install -g pnpm@10.4.1
- name: Generate Changelog
id: changelog
env:
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
node-version: 18
- name: Install pnpm
run: |
npm install -g pnpm@8.9.0
npm install -g pnpm@10.4.1
- name: Build SEA-Config-Schema project
id: build
env:
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
node-version: 18
- name: Install pnpm
run: |
npm install -g pnpm@8.9.0
npm install -g pnpm@10.4.1
- name: Build SEA-GUI project
id: build
env:
Expand Down
11,960 changes: 6,779 additions & 5,181 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"main": "dist/index.js",
"scripts": {
"build": "npx esbuild --minify --bundle --platform=node --target=node18 --outfile=./dist/index.js src/index.ts",
"build": "npx esbuild --minify --bundle --platform=node --target=node22 --outfile=./dist/index.js src/index.ts",
"watch": "tsc -w",
"test": "jest",
"cdk": "cdk"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"main": "dist/index.js",
"scripts": {
"build": "npx esbuild --minify --bundle --platform=node --target=node18 --outfile=./dist/index.js src/index.ts",
"build": "npx esbuild --minify --bundle --platform=node --target=node22 --outfile=./dist/index.js src/index.ts",
"watch": "tsc -w",
"test": "jest",
"cdk": "cdk"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"main": "dist/index.js",
"scripts": {
"build": "npx esbuild --minify --bundle --platform=node --target=node18 --outfile=./dist/index.js src/index.ts",
"build": "npx esbuild --minify --bundle --platform=node --target=node22 --outfile=./dist/index.js src/index.ts",
"watch": "tsc -w",
"test": "jest",
"cdk": "cdk"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ export class OpenSearchSiemStack extends Stack {
);

const geoIpDownloader = new lambda.Function(scope, 'GeoIpDownloaderLambda', {
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
role: lambdaRole,
code: lambda.Code.fromAsset('lambdas/siem-geoip/dist'),
handler: 'index.geoIpDownloader',
Expand Down
2 changes: 1 addition & 1 deletion reference-artifacts/Add-ons/opensiem/lib/siem-configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export class OpenSearchSiemConfigure extends Construct {
});

return new lambda.Function(stack, `ConfigureLambda`, {
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
code: lambda.Code.fromAsset('lambdas/siem-config/dist'),
role: lambdaRole,
handler: 'index.handler',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class OpenSearchSiemGeoIpInit extends Construct {
);

return new lambda.Function(stack, `GeoIpInitLambda`, {
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
code: lambda.Code.fromAsset('lambdas/siem-geoip/dist'),
role,
handler: 'index.geoIpInit',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@
"resource-types": [
"AWS::EC2::Instance"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"remediation-action": "Attach-IAM-Instance-Profile",
"remediation": true,
"remediation-params": {
Expand All @@ -785,7 +785,7 @@
"resource-types": [
"AWS::IAM::Role"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"parameters": {
"AWSManagedPolicies": "AmazonSSMManagedInstanceCore, AmazonSSMDirectoryServiceAccess, CloudWatchAgentServerPolicy",
"CustomerManagedPolicies": "${SEA::EC2InstaceProfilePermissions}",
Expand Down Expand Up @@ -980,7 +980,7 @@
"resource-types": [
"AWS::IAM::Role"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"parameters": {
"RoleNames": "EC2-Default-SSM-AD-Role, ${ACCELERATOR_PREFIX_ND}-RDGW-Role, ${ACCELERATOR_PREFIX_ND}-Rsyslog-Role",
"QSConfigID": "*** REPLACE AFTER QUICK SETUP ***",
Expand Down
4 changes: 2 additions & 2 deletions reference-artifacts/SAMPLE_CONFIGS/config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@
"resource-types": [
"AWS::EC2::Instance"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"remediation-action": "Attach-IAM-Instance-Profile",
"remediation": true,
"remediation-params": {
Expand All @@ -780,7 +780,7 @@
"resource-types": [
"AWS::IAM::Role"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"parameters": {
"AWSManagedPolicies": "AmazonSSMManagedInstanceCore, AmazonSSMDirectoryServiceAccess, CloudWatchAgentServerPolicy",
"CustomerManagedPolicies": "${SEA::EC2InstaceProfilePermissions}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@
"resource-types": [
"AWS::EC2::Instance"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"remediation-action": "Attach-IAM-Instance-Profile",
"remediation": true,
"remediation-params": {
Expand All @@ -792,7 +792,7 @@
"resource-types": [
"AWS::IAM::Role"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"parameters": {
"AWSManagedPolicies": "AmazonSSMManagedInstanceCore, AmazonSSMDirectoryServiceAccess, CloudWatchAgentServerPolicy",
"CustomerManagedPolicies": "${SEA::EC2InstaceProfilePermissions}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@
"resource-types": [
"AWS::EC2::Instance"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"remediation-action": "Attach-IAM-Instance-Profile",
"remediation": true,
"remediation-params": {
Expand All @@ -780,7 +780,7 @@
"resource-types": [
"AWS::IAM::Role"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"parameters": {
"AWSManagedPolicies": "AmazonSSMManagedInstanceCore, AmazonSSMDirectoryServiceAccess, CloudWatchAgentServerPolicy",
"CustomerManagedPolicies": "${SEA::EC2InstaceProfilePermissions}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@
"resource-types": [
"AWS::EC2::Instance"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"remediation-action": "Attach-IAM-Instance-Profile",
"remediation": true,
"remediation-params": {
Expand All @@ -775,7 +775,7 @@
"resource-types": [
"AWS::IAM::Role"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"parameters": {
"AWSManagedPolicies": "AmazonSSMManagedInstanceCore, AmazonSSMDirectoryServiceAccess, CloudWatchAgentServerPolicy",
"CustomerManagedPolicies": "${SEA::EC2InstaceProfilePermissions}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@
"resource-types": [
"AWS::EC2::Instance"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"remediation-action": "Attach-IAM-Instance-Profile",
"remediation": true,
"remediation-params": {
Expand All @@ -780,7 +780,7 @@
"resource-types": [
"AWS::IAM::Role"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"parameters": {
"AWSManagedPolicies": "AmazonSSMManagedInstanceCore, AmazonSSMDirectoryServiceAccess, CloudWatchAgentServerPolicy",
"CustomerManagedPolicies": "${SEA::EC2InstaceProfilePermissions}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@
"resource-types": [
"AWS::EC2::Instance"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"remediation-action": "Attach-IAM-Instance-Profile",
"remediation": true,
"remediation-params": {
Expand All @@ -792,7 +792,7 @@
"resource-types": [
"AWS::IAM::Role"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"parameters": {
"AWSManagedPolicies": "AmazonSSMManagedInstanceCore, AmazonSSMDirectoryServiceAccess, CloudWatchAgentServerPolicy",
"CustomerManagedPolicies": "${SEA::EC2InstaceProfilePermissions}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@
"resource-types": [
"AWS::EC2::Instance"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"remediation-action": "Attach-IAM-Instance-Profile",
"remediation": true,
"remediation-params": {
Expand All @@ -792,7 +792,7 @@
"resource-types": [
"AWS::IAM::Role"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"parameters": {
"AWSManagedPolicies": "AmazonSSMManagedInstanceCore, AmazonSSMDirectoryServiceAccess, CloudWatchAgentServerPolicy",
"CustomerManagedPolicies": "${SEA::EC2InstaceProfilePermissions}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@
"resource-types": [
"AWS::EC2::Instance"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"remediation-action": "Attach-IAM-Instance-Profile",
"remediation": true,
"remediation-params": {
Expand All @@ -785,7 +785,7 @@
"resource-types": [
"AWS::IAM::Role"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"parameters": {
"AWSManagedPolicies": "AmazonSSMManagedInstanceCore, AmazonSSMDirectoryServiceAccess, CloudWatchAgentServerPolicy",
"CustomerManagedPolicies": "${SEA::EC2InstaceProfilePermissions}",
Expand Down
4 changes: 2 additions & 2 deletions reference-artifacts/SAMPLE_CONFIGS/config.test-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@
"resource-types": [
"AWS::EC2::Instance"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"remediation-action": "Attach-IAM-Instance-Profile",
"remediation": true,
"remediation-params": {
Expand All @@ -840,7 +840,7 @@
"resource-types": [
"AWS::IAM::Role"
],
"runtime": "nodejs18.x",
"runtime": "nodejs22.x",
"parameters": {
"AWSManagedPolicies": "AmazonSSMManagedInstanceCore, AmazonSSMDirectoryServiceAccess, CloudWatchAgentServerPolicy",
"CustomerManagedPolicies": "${SEA::EC2InstaceProfilePermissions}",
Expand Down
2 changes: 1 addition & 1 deletion src/core/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"main": "dist/index.js",
"scripts": {
"build": "pnpx esbuild --minify --bundle --platform=node --target=node18 --outfile=./dist/index.js src/index.ts",
"build": "pnpx esbuild --minify --bundle --platform=node --target=node22 --outfile=./dist/index.js src/index.ts",
"test": "pnpx jest",
"lint:typecheck": "pnpx tsc --noEmit",
"lint:eslint": "pnpx eslint '{cdk,lib,src}/**/*.{js,ts}'"
Expand Down
3 changes: 2 additions & 1 deletion src/deployments/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@
"proxy-agent": "6.4.0",
"semver": "7.5.4",
"tempy": "1.0.1",
"uuid": "9.0.1"
"uuid": "9.0.1",
"yaml": "1.10.2"
},
"devDependencies": {
"@aws-accelerator/cdk-plugin-assume-role": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions src/deployments/cdk/src/common/alb-ip-forwarding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class AlbIpForwarding extends Construct {
const lambdaCode = lambda.Code.fromAsset(lambdaDir);

const dnsFWLambda = new lambda.Function(this, `${prefix}dnsFWLambda`, {
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
memorySize: 512,
code: lambdaCode,
handler: 'index.albIpMonitor',
Expand All @@ -81,7 +81,7 @@ export class AlbIpForwarding extends Construct {
);

const lambdaDnsRecordMonitor = new lambda.Function(this, `${prefix}ddbDnsRecordMonitor`, {
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
memorySize: 512,
handler: 'index.albTargetRecordMonitor',
code: lambdaCode,
Expand Down
2 changes: 1 addition & 1 deletion src/deployments/cdk/src/deployments/alb/step-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ export function getLambdaFunctionArn(
const artifactsFilePath = fs.readFileSync(path.join(__dirname, 'artifacts', fileName));
const elbLambdaFunction = new lambda.Function(scope, `ElbLambdaFunction${albName}${targetName}`, {
// Inline code is only allowed for Node.js version 12
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
code: lambda.Code.fromInline(artifactsFilePath.toString()),
handler: 'index.handler',
role,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ async function cwlSettingsInLogArchive(props: {
const lambdaCode = lambda.Code.fromAsset(lambdaDir);

const firhosePrefixProcessingLambda = new lambda.Function(scope, `FirehosePrefixProcessingLambda`, {
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
code: lambdaCode,
handler: 'index.firehoseCustomPrefix',
memorySize: 2048,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export function createMetadataService(props: MetadataServiceProps) {
);

const metadataLambda = new lambda.Function(masterAccountStack, `MetadataLambda`, {
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
code: lambdaCode,
role: lambdaRole,
handler: 'index.metadataCollection',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export async function createOrganizationalUnit(input: CreateOrganizationalUnitEv
const { scope, lambdaCode, acceleratorPipelineRole, acceleratorPrefix, ignoredOus, organizationAdminRole } = input;

const orgChangeFunc = new lambda.Function(scope, 'organizationChanges', {
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
handler: 'index.ouValidationEvents.createOrganizationalUnit',
code: lambdaCode,
role: acceleratorPipelineRole,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function changePolicy(input: PolicyChangeEventProps) {
} = input;

const policyChangeFunc = new lambda.Function(scope, 'policyChanges', {
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
handler: 'index.ouValidationEvents.changePolicy',
code: lambdaCode,
role: acceleratorPipelineRole,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function removeAccount(input: RemoveAccountProps) {
} = input;

const removeAccountFunc = new lambda.Function(scope, 'removeAccountFromOrganization', {
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
handler: 'index.ouValidationEvents.removeAccount',
code: lambdaCode,
role: acceleratorPipelineRole,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ async function moveAccount(input: MoveAccountProps) {
} = input;
const acceleratorStateMachineArn = `arn:aws:states:${defaultRegion}:${scope.accountId}:stateMachine:${acceleratorStateMachineName}`;
const moveAccountFunc = new lambda.Function(scope, 'moveAccountToOrganization', {
runtime: lambda.Runtime.NODEJS_18_X,
runtime: lambda.Runtime.NODEJS_LATEST,
handler: 'index.ouValidationEvents.moveAccount',
code: lambdaCode,
role: acceleratorPipelineRole,
Expand Down
Loading
Loading