Assign Lambda Function To Specific VPC ID in serverless.yml : <p>I am using Serverless framework to deploy a Python lambda function to AWS. In my <code>serverless.yml</code> file I have defined a function which I need to deploy to a VPC with specific ID as only that VPC has network connectivity needed to make some business related requests from the lambda function.</p>

<pre><code>  customer_callback:
    vpc:
      subnetIds:
        - subnet-something
    handler: myservice/event_stream.customer_callback
</code></pre>

<p>In the documentation, the above example is what they mention as a way to attach the function to a VPC:</p>

<p><a href="https://serverless.com/framework/docs/providers/aws/guide/functions/" rel="noreferrer">https://serverless.com/framework/docs/providers/aws/guide/functions/</a></p>

<p>However, the function is not deployed to a VPC at all, e.g. I end up with:</p>

<p><a href="https://i.stack.imgur.com/zhZ87.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zhZ87.png" alt="enter image description here"></a></p>

<p>I have tried specifying VPC ID directly like this:</p>

<pre><code>  customer_callback:
    vpc:
      id: vpc-something
    handler: myservice/event_stream.customer_callback
</code></pre>

<p>But that does nothing as well. The documentation for this issue is basically non-existent and I tried searching a lot so I finally have to post here to ask for help.</p>
