Skip to content

Commit

Permalink
Address cfn_nag issues
Browse files Browse the repository at this point in the history
  • Loading branch information
biffgaut committed Oct 19, 2021
1 parent 83b0339 commit 8b6f1d7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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
});
Expand All @@ -60,6 +61,7 @@ const props: AlbToLambdaProps = {
},
publicApi: false
};

new AlbToLambda(stack, 'test-one', props);

// Synth
Expand Down

0 comments on commit 8b6f1d7

Please sign in to comment.