cloudmapper icon indicating copy to clipboard operation
cloudmapper copied to clipboard

Update CDK app Lambda run-time from NodeJS 8.10 to 10

Open 0xdabbad00 opened this issue 7 years ago • 4 comments

The CDK app for the nightly auditor creates a helper lambda that uses NodeJS 8.10. That run-time has been deprecated, but I can't update this because it needs to be updated by the CDK. https://github.com/aws/aws-cdk/issues/4653

0xdabbad00 avatar Oct 23 '19 20:10 0xdabbad00

Looks like CDK has been fixed in 1.17.0

https://github.com/aws/aws-cdk/releases/tag/v1.17.0

cybergoof avatar Nov 20 '19 00:11 cybergoof

I tried updating this but the new CDK no longer let's me do the trick I was doing to force the ECS into a public subnet at https://github.com/duo-labs/cloudmapper/blob/c84742e4a8d3f9d7988549b5fde086303efaded5/auditor/lib/cloudmapperauditor-stack.js#L51

I tried a different tactic using the code below, but something still isn't working (the ECS doesn't record any logs to CloudWatch, so I suspect it doesn't have Internet egress out), so this will take more work.

    const vpc = new ec2.Vpc(this, 'CloudMapperVpc', {
        maxAzs: 2,
        natGateways: 0,
        subnetConfiguration: [
          {
            cidrMask: 24,
            name: 'Public',
            subnetType: ec2.SubnetType.PUBLIC
          }
        ]
    });

0xdabbad00 avatar Nov 21 '19 04:11 0xdabbad00

I don't have it setup to test, but are you able to use the ISOLATED subnet type to accomplish what you want?

    const vpc = new ec2.Vpc(this, 'CloudMapperVpc', {
        maxAzs: 2,
        subnetConfiguration: [
          { name: "private", subnetType: ec2.SubnetType.ISOLATED}
        ]
    });

I'm guessing you want a private subnet but not a NAT Gateway? I used this to synth the template and the NAT gateway doesn't show up. But it looks like it created the PRIVATE subnets.

cybergoof avatar Nov 21 '19 14:11 cybergoof

Resolved in #628

I made the subnet public. I saw the CDK mention isolated subnets, but I don't know what that means.

0xdabbad00 avatar Dec 14 '19 22:12 0xdabbad00