serverless-components / express

⚡ Take existing Express.js apps and host them easily on cheap, auto-scaling, serverless infrastructure (AWS Lambda and AWS HTTP API).
https://serverless.com/components
Apache License 2.0
375 stars 34 forks source link

VPC/subnetIds configuration #40

Closed hexelon closed 3 years ago

hexelon commented 3 years ago

Hey,

I saw there's a reference to setting up vpc and subnets in the utils.js code but it doesn't seem work to work for me. Is there some reference/example I can use?

murvinlai commented 3 years ago

I'm also trying to set the VPC and subnets and security for my lambda function. do you have a solution?

murvinlai commented 3 years ago

I have tried putting vpc securityGroupIds:

in my serverless.yml but doesn't work. it says " Serverless › Invalid Input: "vpc" is not allowed "

murvinlai commented 3 years ago

I think it is because express/serverless.component.yml doesn't have vpc there. probably need to do a pull request

jcardus commented 3 years ago

Same here... Tried changing on the lambda configuration on the console but didn't work either...

enahomurphy commented 3 years ago

@jcardus I think there is a pull request to solve this issue.

But if you can't wait for that you can do what I did, create a custom express component from this repo. here is an example of what I did https://github.com/serverless-components/express/pull/44/files

I had to support vpc and efs file system.

jcardus commented 3 years ago

@enahomurphy there's a pull request but it doesn't have any effect on this. I ended up going back to aws sam. Thanks for replying.

murvinlai commented 3 years ago

same here. i have tried many times and didn't work. at the end, I just built my own serverless.

eahefnawy commented 3 years ago

Hey all, there was a backend bug with the type system that caused this issue, even though it's support by the component itself. I've just published v1.7.3 of the express component that fixes this. I've tested VPC config and made sure it's passed to the lambda configuration. Should be good to go.

Feel free to reopen this issue if you're still facing the same isssue.