1.0.2 • Published 3 years ago

@nona-creative/aws-cdk-vpc v1.0.2

Weekly downloads
63
License
MIT
Repository
-
Last release
3 years ago

AWS VPC (CDK)

Installation

npm i -S @nona-creative/aws-cdk-vpc

Usage

  1. Create the VPC Stack

    this.vpcStack = new VPCStack(this.scope, `${this.id}-vpc-${this.stage}`, { stage: this.stage })

    This will also create a private and public Subnet and NAT Gateway, but no security groups.

  2. Create Security Groups as needed eg.

    this.vpcStack.createSecurityGroup({
      name: LAMBDA_VPC_SECURITY_GROUP_NAME,
      description: 'Lambda Security Group for app VPC',
    })
    this.vpcStack.createSecurityGroup({
      name: RDS_VPC_SECURITY_GROUP_NAME,
      description: 'RDS Security Group for app VPC',
      allowAllOutbound: false,
    })
  3. Create Ingress Rules as needed, eg.

    this.vpcStack.addSecurityGroupIngressRule({
      targetSecurityGroupName: RDS_VPC_SECURITY_GROUP_NAME,
      sourceSecurityGroupName: LAMBDA_VPC_SECURITY_GROUP_NAME,
      port: RDS_PORT,
    })
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.0

4 years ago