Skip to content

aws cdk support #1387

@Hebilicious

Description

@Hebilicious

Describe the feature

AWS cdk support would allow Nitro to have 0 config deploy to AWS.

See discussions here for more context : #1106
See amazing PR for how CDK logic could be implemented https://github.com/unjs/nitro/pull/240/files

I believe we have 2 options:

  1. With a Nitro config flag

Using a preset hook we could do this

  hooks: {
    async compiled(nitro: Nitro) {
    if(nitro.aws.cdk){
      await generateCdkApp(nitro);
      }
    },
  },

The problem is that its not ideal for the deploy command.

  1. With dedicated presets

We could create 2 extra presets :

aws-lambda-cdk
aws-lambda-edge-cdk

Both would be transforming the regular output into CDK output, which means we can have a one liner deploy command like this cd ./cdk && APP_ID=<your app id> npm run deploy

This is a little bit cleaner in my opinion.

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions