# Non-Default VPC Access

**URL:** <https://forum.serverless.com/t/non-default-vpc-access/4448>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [May 8, 2018, 4:52am UTC](https://forum.serverless.com/t/non-default-vpc-access/4448 "2018-05-08T04:52:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukiffer](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/lukiffer/32/1950_2.png) [@lukiffer](https://forum.serverless.com/u/lukiffer)\
**Post date:** [May 8, 2018, 4:52am UTC](https://forum.serverless.com/t/non-default-vpc-access/4448/1 "2018-05-08T04:52:33Z")

</div>

When deploying a lambda with VPC access, everything works as expected when using the default VPC. However, if you specify a subnet and/or security group that exists in the non-default VPC, there’s no way to specify the VPC ID. Instead it just throws an error `Error occurred while DescribeSecurityGroups. EC2 Error Code: InvalidGroup.NotFound. EC2 Error Message: The security group 'sg-xxxxxxxx' does not exist.`

Is there a way to specify a non-default VPC ID? Is there another explanation for this error, as the AWS docs imply that the VPC ID should be inferred from the security group/subnet specification assuming they’re both part of the same VPC.

---

<div class="post-metadata">

**Author:** ![tulioliveira](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/tulioliveira/32/2807_2.png) [@tulioliveira](https://forum.serverless.com/u/tulioliveira)\
**Post date:** [November 30, 2018, 2:04pm UTC](https://forum.serverless.com/t/non-default-vpc-access/4448/2 "2018-11-30T14:04:25Z")

</div>

Hey there, lukiffer!

Did you have any luck with this? I’m having the same problem…
