Currently I'm using AWS CDK to create a simple lambda function.
const hello = new Function(this,"HelloHandler",{
role:lambdaRole,
runtime:Runtime.NODEJS_16_X,
code:Code.fromAsset("dist"),
handler:"index.handler",
})
I wish to add a VPC to the lambda. Normally one would need to create a VPC in the normal manner. However in my scenario, I wish to add a VPC that already exists and was created using the AWS console.
Is there a way to do so?
Note:
- I'm using TypeScript