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

feat(aws-lambda-stepfunctions) added vpc support #333

Merged
merged 11 commits into from
Aug 16, 2021
Prev Previous commit
Next Next commit
Added vpc support for lambda-step-function
  • Loading branch information
root committed Aug 13, 2021
commit fd35318896c054c5f2a405ea0a57c9bd70857395
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import * as lambda from '@aws-cdk/aws-lambda';
import * as sfn from '@aws-cdk/aws-stepfunctions';
import { LambdaToStepfunctions } from "@aws-solutions-constructs/aws-lambda-stepfunctions";
import { Construct } from '@aws-cdk/core';
import * as ec2 from "@aws-cdk/aws-ec2";
import * as logs from '@aws-cdk/aws-logs';

/**
Expand Down Expand Up @@ -59,6 +60,20 @@ export interface LambdaToStepFunctionProps {
* @default - None
*/
readonly stateMachineEnvironmentVariableName?: string;
/**
* An existing VPC for the construct to use (construct will NOT create a new VPC in this case)
*/
readonly existingVpc?: ec2.IVpc;
/**
* Properties to override default properties if deployVpc is true
*/
readonly vpcProps?: ec2.VpcProps;
/**
* Whether to deploy a new VPC
*
* @default - false
*/
readonly deployVpc?: boolean;
}

/**
Expand All @@ -69,6 +84,7 @@ export class LambdaToStepFunction extends Construct {
public readonly stateMachine: sfn.StateMachine;
public readonly stateMachineLogGroup: logs.ILogGroup;
public readonly cloudwatchAlarms?: cloudwatch.Alarm[];
public readonly vpc?: ec2.IVpc;

/**
* @summary Constructs a new instance of the LambdaToStepFunctionProps class.
Expand All @@ -87,5 +103,6 @@ export class LambdaToStepFunction extends Construct {
this.stateMachine = wrappedConstruct.stateMachine;
this.stateMachineLogGroup = wrappedConstruct.stateMachineLogGroup;
this.cloudwatchAlarms = wrappedConstruct.cloudwatchAlarms;
this.vpc = wrappedConstruct.vpc;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"@aws-cdk/aws-stepfunctions": "0.0.0",
"@aws-cdk/aws-logs": "0.0.0",
"@aws-cdk/core": "0.0.0",
"@aws-cdk/aws-ec2": "0.0.0",
"@aws-solutions-constructs/core": "0.0.0",
"@aws-solutions-constructs/aws-lambda-stepfunctions": "0.0.0",
"constructs": "^3.2.0"
Expand Down Expand Up @@ -87,6 +88,7 @@
"@aws-cdk/aws-lambda": "0.0.0",
"@aws-cdk/aws-stepfunctions": "0.0.0",
"@aws-cdk/core": "0.0.0",
"@aws-cdk/aws-ec2": "0.0.0",
"@aws-solutions-constructs/core": "0.0.0",
"@aws-solutions-constructs/aws-lambda-stepfunctions": "0.0.0",
"constructs": "^3.2.0",
Expand Down
Loading