@nona-creative/aws-cdk-vpc
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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,
    })

Readme

Keywords

Package Sidebar

Install

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

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

65.4 kB

Total Files

24

Last publish

Collaborators

  • ian-cawood
  • yesitsdave
  • syntaxza
  • rollyourowned
  • neilrussell6