-
-
Notifications
You must be signed in to change notification settings - Fork 458
Integrating lambdas with existing VPC/Subnets #2168
-
I was reading on the Serverless documents a method for attaching pre-existing VPC's to lambdas like so:
# serverless.yml service: service-name provider: name: aws vpc: securityGroupIds: - securityGroupId1 - securityGroupId2 subnetIds: - subnetId1 - subnetId2 functions: hello: # this function will overwrite the service level vpc config above handler: handler.hello vpc: securityGroupIds: - securityGroupId1 - securityGroupId2 subnetIds: - subnetId1 - subnetId2 users: # this function will inherit the service level vpc config above handler: handler.users
Is it possible to specify and attach the lambdas that are generated from serverless-nextjs to a specific VPC and subnets?
EDIT
It's currently not possible to associate Lambda@Edge with a VPC. Better luck next time
Beta Was this translation helpful? Give feedback.
All reactions
Yes, currently Lambda@Edge is more limited, for example you cannot attach a VPC at the moment. But in the near future (hopefully by 1-2 months) I am working on adding Lambda support back again (Lambda + APIGatewayV2 + CloudFront) with proper IaC, so it should be potentially fully configurable at your end instead of the limited abstractions we provide via a serverless.yml file. For a preview (it's NOT production ready yet, you would need to hack things together to get it to work/deploy via CDK Terraform), you can check it out here: https://github.com/serverless-nextjs/serverless-next.js/tree/master/packages/libs/lambda and https://github.com/serverless-nextjs/serverless-next.js/blob/master...
Replies: 3 comments
-
Yes, currently Lambda@Edge is more limited, for example you cannot attach a VPC at the moment. But in the near future (hopefully by 1-2 months) I am working on adding Lambda support back again (Lambda + APIGatewayV2 + CloudFront) with proper IaC, so it should be potentially fully configurable at your end instead of the limited abstractions we provide via a serverless.yml file. For a preview (it's NOT production ready yet, you would need to hack things together to get it to work/deploy via CDK Terraform), you can check it out here: https://github.com/serverless-nextjs/serverless-next.js/tree/master/packages/libs/lambda and https://github.com/serverless-nextjs/serverless-next.js/blob/master/packages/libs/lambda/src/deploy/cdktf/nextJsLambdaApp.ts
Beta Was this translation helpful? Give feedback.
All reactions
-
Hey @dphang any update on this? Interested on how this would work :)
Beta Was this translation helpful? Give feedback.
All reactions
-
Would love to hear more on this since.
use case being, If you have security requirements (SOC, HIPAA, PCI) requirements where lambdas must be on a VPC you can't use Edge lambdas.
Since they do not allow vpc deployment.
Beta Was this translation helpful? Give feedback.