Update CDK app Lambda run-time from NodeJS 8.10 to 10
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
Looks like CDK has been fixed in 1.17.0
https://github.com/aws/aws-cdk/releases/tag/v1.17.0
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
}
]
});
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.
Resolved in #628
I made the subnet public. I saw the CDK mention isolated subnets, but I don't know what that means.