stashimi / serverless

Inofficial fork of the Serverless Framework with the intent of keeping backward compatibility to the 0.5.x release while adding new features and bug fixes
http://www.serverless.com
Other
0 stars 0 forks source link

Deployment fails with empty VPC config as of today #6

Closed HyperBrain closed 7 years ago

HyperBrain commented 7 years ago

According to the REST API documentation at http://docs.aws.amazon.com/lambda/latest/dg/API_CreateFunction.html you have to omit the VPC configuration or set at least one security group id and one subnet id.

Since today AWS seems to enforce this. Serverless 0.5.6+ submits an empty VPCConfig object if no VPC configuration has been set. Now this leads to an error during deployment.

The issue can be fixed by omitting the VPCConfig at all in case no VPC information has been set, instead of submitting an empty one (with empty arrays).