# Serverless Deploy validation error

**URL:** <https://forum.serverless.com/t/serverless-deploy-validation-error/17024>\
**Category:** Serverless Architectures\
**Tags:** aws, cloudformation, variables\
**Created:** [April 12, 2022, 1:41pm UTC](https://forum.serverless.com/t/serverless-deploy-validation-error/17024 "2022-04-12T13:41:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![debarghya87](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@debarghya87](https://forum.serverless.com/u/debarghya87)\
**Post date:** [April 12, 2022, 1:41pm UTC](https://forum.serverless.com/t/serverless-deploy-validation-error/17024/1 "2022-04-12T13:41:04Z")

</div>

Hi All,

I am trying to deploy a function inside a vpc using the serverless deploy command.  
But while deploying I am getting the below serverless error.

**Serverless Error ---------------------------------------**

\*\* An error occurred: CreateUnderscoreordersDashsqsLambdaFunction - Resource handler returned message: “1 validation error detected: Value ‘[subnet-xxx,subnet-yyy,subnet-zzz]’ at ‘vpcConfig.subnetIds’ failed to satisfy constraint: Member must satisfy constraint: [Member must have length less than or equal to 1024, Member must have length greater than or equal to 0, Member must satisfy regular expression pattern: ^subnet-[0-9a-z]\*$] (Service: Lambda, Status Code: 400, Request ID: e2476da3-xxx-0081ccf32b30)” (RequestToken: ce713c0e-xxx-b56910bf568c, HandlerErrorCode: InvalidRequest).\*\*

I am not able to find any examples/blogs that match my criteria. Any guidance/samples would be highly appreciated.

---

<div class="post-metadata">

**Author:** ![bdb2381](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/bdb2381/32/6578_2.png) [@bdb2381](https://forum.serverless.com/u/bdb2381)\
**Post date:** [April 18, 2022, 4:37pm UTC](https://forum.serverless.com/t/serverless-deploy-validation-error/17024/2 "2022-04-18T16:37:02Z")

</div>

Can you post your code snippet, which would provide some context?

How are you providing your subnet IDS? As variables? As a Cloudformation Reference?  
[This 2 year old Issue seems related](https://github.com/serverless/serverless/issues/8282)
