Specifying AWS VPC config in Serverless Components

I have some experience with the Serverless framework but am new to Serverless Components and am having a little trouble trying to figure out the syntax to deploy lambda functions in AWS VPCs.

With Serverless I’ve followed this guide https://www.serverless.com/framework/docs/providers/aws/guide/functions/ to successfully deploy apps inside my vpc
per function

# serverless.yml
service: service-name
provider: aws

functions:
  hello:
    handler: handler.hello
    vpc:
      securityGroupIds:
        - securityGroupId1
        - securityGroupId2
      subnetIds:
        - subnetId1
        - subnetId2

or globally

# serverless.yml
service: service-name
provider:
  name: aws
  vpc:
    securityGroupIds:
      - securityGroupId1
      - securityGroupId2
    subnetIds:
      - subnetId1
      - subnetId2

functions:
  hello: # this function will overwrite the service level vpc config above
    handler: handler.hello
    vpc:
      securityGroupIds:
        - securityGroupId1
        - securityGroupId2
      subnetIds:
        - subnetId1
        - subnetId2
  users: # this function will inherit the service level vpc config above
    handler: handler.users

However I don’t seem to be able to find any documentation on how to launch a lambda function inside an AWS VPC with Serverless Components when editing apps/site/resources.js in an analogous way to the Serverless framework such as

component: "@webiny/serverless-function",
inputs: {
  src: "./src",
  vpc: {
    subnetIds: [subnetId1, subnetId2],
    securityGroupIds: [securityGroupId1, securityGroupId2]
  }
}

In the Chinese language readme file https://github.com/serverless/components/blob/master/README.cn.md there is a mention of vpcName, and a couple of open issues on github mention vpc support, however with testing different key:value pairs I don’t seem to be able to deploy the lambda into a VPC without manually updating the vpc settings of the lambda in the AWS console.

Any help/pointers to something that I’ve missed would be appreciated.

I was wondering the same. Were you able to find a way ?

I couldn’t find a way to do it in the framework, but got my use-case working by deploying the project then manually editing the Lambda settings in the AWS console adding the subnet ids and security group ids in the VPC section. The VPC settings persist when the app is redeployed. I thought about having some kind of post-deploy hook that sets the VPC info aws lambda update-function-configuration --function-name my-function --vpc-config SubnetIds=[],SecurityGroupIds=[] but I’m not dynamically adding new projects so manually editing in the console once worked for my use-case.