From 8b6f1d783b9508ecc559f4b2306b7f31b648f082 Mon Sep 17 00:00:00 2001 From: biffgaut <78155736+biffgaut@users.noreply.github.com> Date: Tue, 19 Oct 2021 16:35:07 -0400 Subject: [PATCH] Address cfn_nag issues --- .../aws-alb-lambda/test/integ.privateApiExistingResources.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.privateApiExistingResources.ts b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.privateApiExistingResources.ts index 3f766a714..d23177850 100644 --- a/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.privateApiExistingResources.ts +++ b/source/patterns/@aws-solutions-constructs/aws-alb-lambda/test/integ.privateApiExistingResources.ts @@ -16,6 +16,7 @@ import { Aws, App, Stack } from "@aws-cdk/core"; import { AlbToLambda, AlbToLambdaProps } from "../lib"; import { generateIntegStackName } from '@aws-solutions-constructs/core'; import * as lambda from '@aws-cdk/aws-lambda'; +import * as ec2 from '@aws-cdk/aws-ec2'; import * as elb from '@aws-cdk/aws-elasticloadbalancingv2'; import * as defaults from '@aws-solutions-constructs/core'; @@ -46,7 +47,7 @@ const lambdaFunction = new lambda.Function(stack, 'existingFunction', { vpc: myVpc, }); -const loadBalancer = new elb.ApplicationLoadBalancer(stack, 'new-lb', { +const loadBalancer = defaults.ObtainAlb(stack, 'existing-alb', myVpc, false, undefined, { internetFacing: false, vpc: myVpc }); @@ -60,6 +61,7 @@ const props: AlbToLambdaProps = { }, publicApi: false }; + new AlbToLambda(stack, 'test-one', props); // Synth