Can someone tell me. Where is the setting to place...
# help
n
Can someone tell me. Where is the setting to place a lambda in a VPC? I’ve created a VPC in CDK. I just need to make sure the created lambda is sitting within it.
r
You need to specify the subnets and security group. Not in front of computer at the moment so can't share exactly what you need but hopefully that points you in the right direction
n
thanks. is that setting in the defaults property for the API construct?
r
"Create Lambda Functions in a VPC in AWS CDK | bobbyhadz" https://bobbyhadz.com/blog/aws-cdk-lambda-function-vpc
You can access the lambda CDK construct on the SST Function
n
thanks @Ross Coundon was just reading the same thing
f
Thanks @Ross Coundon!
Hope that helps
n
Thanks Frank!
h
Just clarify a bit: Configuring VPC doesn't mean the function is running in your VPC. It just provides a way to access other resources in your VPC (e.g. RDS). Unless you need to access VPC resources, don't configure VPC as it can cause extra cold-start.