Add VPC conditionally to lambda function

Viewed 14

I have a python CDK project and only wish to add a vpc to a lambda function if the vpc is mentioned in a parameter that I'm reading from. How can I add a vpc only if that condition exists in a parameter. I'd like to avoid adding a conditional if and having the same function typed out twice and prefer to be able to just add on to the already defined function.

0 Answers
Related