Skip to content
Merged
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 .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
nodejs 20.18.0
nodejs 22.12.0
python 3.12.7
poetry 1.8.3
shellcheck 0.10.0
Expand Down
10,334 changes: 7,529 additions & 2,805 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"check-licenses": "license-checker --failOn GPL --failOn LGPL --start ../.."
},
"dependencies": {
"aws-cdk-lib": "^2.167.1",
"aws-cdk-lib": "^2.173.1",
"cdk-nag": "^2.34.15",
"constructs": "^10.4.2",
"source-map-support": "^0.5.21"
Expand Down
3 changes: 0 additions & 3 deletions packages/cdk/resources/CognitoFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {LambdaFunction} from "./LambdaFunction"
import {ITableV2} from "aws-cdk-lib/aws-dynamodb"
import {IManagedPolicy} from "aws-cdk-lib/aws-iam"
import {Secret} from "aws-cdk-lib/aws-secretsmanager"
import {Runtime} from "aws-cdk-lib/aws-lambda"
import {NodejsFunction} from "aws-cdk-lib/aws-lambda-nodejs"
import {SharedSecrets} from "./SharedSecrets"
import {NagSuppressions} from "cdk-nag"
Expand Down Expand Up @@ -48,7 +47,6 @@ export class CognitoFunctions extends Construct {

// Create the token Lambda function
const tokenLambda = new LambdaFunction(this, "TokenResources", {
runtime: Runtime.NODEJS_20_X,
serviceName: props.serviceName,
stackName: props.stackName,
lambdaName: `${props.stackName}-token`,
Expand Down Expand Up @@ -102,7 +100,6 @@ export class CognitoFunctions extends Construct {
}

mockTokenLambda = new LambdaFunction(this, "MockTokenResources", {
runtime: Runtime.NODEJS_20_X,
serviceName: props.serviceName,
stackName: props.stackName,
lambdaName: `${props.stackName}-mock-token`,
Expand Down
4 changes: 1 addition & 3 deletions packages/cdk/resources/LambdaFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
ServicePrincipal
} from "aws-cdk-lib/aws-iam"
import {NodejsFunction} from "aws-cdk-lib/aws-lambda-nodejs"
import {CfnFunction, LayerVersion, Runtime} from "aws-cdk-lib/aws-lambda"
import {CfnFunction, LayerVersion} from "aws-cdk-lib/aws-lambda"
import {Fn, RemovalPolicy} from "aws-cdk-lib"
import {Key} from "aws-cdk-lib/aws-kms"
import {
Expand All @@ -27,7 +27,6 @@ export interface LambdaFunctionProps {
readonly serviceName: string
readonly stackName: string
readonly lambdaName: string
readonly runtime: Runtime
readonly additionalPolicies?: Array<IManagedPolicy>
readonly packageBasePath: string
readonly entryPoint: string
Expand Down Expand Up @@ -133,7 +132,6 @@ export class LambdaFunction extends Construct {

const lambdaFunction = new NodejsFunction(this, props.lambdaName, {
...lambdaOptions,
runtime: props.runtime,
role: lambdaRole,
environment: props.lambdaEnvironmentVariables,
logGroup: lambdaLogGroup,
Expand Down
2 changes: 1 addition & 1 deletion packages/cdk/resources/LambdaFunction/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface DefaultLambdaOptionsParams {
function getDefaultLambdaOptions(options: DefaultLambdaOptionsParams): NodejsFunctionProps {
const defaultOptions: NodejsFunctionProps = {
functionName: options.functionName,
runtime: Runtime.NODEJS_20_X,
runtime: Runtime.NODEJS_22_X,
entry: join(baseDir, options.packageBasePath, options.entryPoint),
projectRoot: baseDir,
memorySize: 256,
Expand Down
3 changes: 0 additions & 3 deletions packages/cdk/resources/api/apiFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {LambdaFunction} from "../LambdaFunction"
import {SharedSecrets} from "../SharedSecrets"
import {ITableV2} from "aws-cdk-lib/aws-dynamodb"
import {IManagedPolicy} from "aws-cdk-lib/aws-iam"
import {Runtime} from "aws-cdk-lib/aws-lambda"
import {NodejsFunction} from "aws-cdk-lib/aws-lambda-nodejs"
import {Secret} from "aws-cdk-lib/aws-secretsmanager"
import {NagSuppressions} from "cdk-nag"
Expand Down Expand Up @@ -100,7 +99,6 @@ export class ApiFunctions extends Construct {

// Single Lambda for both real and mock scenarios
const trackerUserInfoLambda = new LambdaFunction(this, "TrackerUserInfo", {
runtime: Runtime.NODEJS_20_X,
serviceName: props.serviceName,
stackName: props.stackName,
lambdaName: `${props.stackName}-TrkUsrNfoUnified`,
Expand All @@ -117,7 +115,6 @@ export class ApiFunctions extends Construct {

// Prescription Search Lambda Function
const prescriptionSearchLambda = new LambdaFunction(this, "PrescriptionSearch", {
runtime: Runtime.NODEJS_20_X,
serviceName: props.serviceName,
stackName: props.stackName,
lambdaName: `${props.stackName}-prescSearch`,
Expand Down
8 changes: 2 additions & 6 deletions packages/cdk/tests/functionConstruct.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {Template, Match} from "aws-cdk-lib/assertions"
import {describe, test, beforeAll} from "@jest/globals"

import {LambdaFunction} from "../resources/LambdaFunction"
import {Runtime} from "aws-cdk-lib/aws-lambda"

describe("functionConstruct works correctly", () => {
let stack: Stack
Expand All @@ -28,7 +27,6 @@ describe("functionConstruct works correctly", () => {
serviceName: "testServiceName",
stackName: "testServiceName-testStack",
lambdaName: "testLambda",
runtime: Runtime.NODEJS_20_X,
additionalPolicies: [
],
packageBasePath: "packages/cdk",
Expand Down Expand Up @@ -111,7 +109,7 @@ describe("functionConstruct works correctly", () => {
test("it has the correct lambda", () => {
template.hasResourceProperties("AWS::Lambda::Function", {
Handler: "index.handler",
Runtime: "nodejs20.x",
Runtime: "nodejs22.x",
FunctionName: "testServiceName-testLambda",
MemorySize: 256,
Architectures: ["x86_64"],
Expand Down Expand Up @@ -150,7 +148,6 @@ describe("functionConstruct works correctly with environment variables", () => {
serviceName: "testServiceName",
stackName: "testServiceName-testStack",
lambdaName: "testLambda",
runtime: Runtime.NODEJS_20_X,
additionalPolicies: [],
packageBasePath: "packages/cdk",
entryPoint: "tests/src/dummyLambda.ts",
Expand All @@ -163,7 +160,7 @@ describe("functionConstruct works correctly with environment variables", () => {

test("environment variables are added correctly", () => {
template.hasResourceProperties("AWS::Lambda::Function", {
Runtime: "nodejs20.x",
Runtime: "nodejs22.x",
FunctionName: "testServiceName-testLambda",
Environment: {Variables: {foo: "bar"}}
})
Expand Down Expand Up @@ -193,7 +190,6 @@ describe("functionConstruct works correctly with additional policies", () => {
serviceName: "testServiceName",
stackName: "testServiceName-testStack",
lambdaName: "testLambda",
runtime: Runtime.NODEJS_20_X,
additionalPolicies: [testPolicy],
packageBasePath: "packages/cdk",
entryPoint: "tests/src/dummyLambda.ts",
Expand Down
Loading