I have an existing VPC with Security Groups and Subnets that I’d like to utilize in a Serverless deploy process for Lambda functions within that VPC. Is there anyway I can retrieve those values and use them programmatically in my Serverless deploy instead of needing to hardcode into the VPC section of the Function?
I don’t think this is easy, but it’s probably possible with a plugin that uses the amazon cli. I had a similar question myself about getting the default VPC arn.
ever figure this out?
One way is to have the vpc in a CloudFormation stack and to put the subnet ids in as Outputs.
serverless makes it easy to retrieve CloudFormation outputs.