Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Deploying with the CDK (or plain Cloudformation) #311

@plumdog

Description

@plumdog

Is your feature request related to a problem? Please describe.
I'm not using the serverless framework, I'm using the CDK. I want to be able to deploy a next.js app to APIGateway/Lambda/S3. I think that this project will help me to do that, but I'm not sure how.

Describe the solution you'd like
An overview of how I might go about generating code using this project and what things need to be deployed to AWS to make the app work.

Describe alternatives you've considered
I have tried using https://github.com/vincent-herlemont/next-aws-lambda-webpack-plugin, which has generated a lambda per page (and a shared lambda layer), but to make it work I need to traverse the lambda directories it creates, and determine the APIGateway config for it. I've also found that for the index route, I get an error like:

TypeError: Cannot read property 'match' of null
    at renderReqToHTML (/var/task/index.js:25929:30)
    at Module.render (/var/task/index.js:26000:28)

Further, one lambda per page seems unnecessary (at least, I'm not sure what the advantages are), though I'm happy to be told it is best practice.

Additional context
None. Happy to put together an example repo if that would be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions