Skip to content
\n

Is it possible to specify and attach the lambdas that are generated from serverless-nextjs to a specific VPC and subnets?

\n

EDIT

\n

It's currently not possible to associate Lambda@Edge with a VPC. Better luck next time

","upvoteCount":3,"answerCount":3,"acceptedAnswer":{"@type":"Answer","text":"

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

","upvoteCount":2,"url":"https://github.com/serverless-nextjs/serverless-next.js/discussions/2168#discussioncomment-1750638"}}}
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Integrating lambdas with existing VPC/Subnets #2168

Answered by dphang
mattguidone asked this question in Q&A
Discussion options

You must be logged in to vote

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

Comment options

You must be logged in to vote
0 replies
Answer selected by dphang
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants