Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws cdk support #1387

Open
1 task done
Hebilicious opened this issue Jul 3, 2023 · 0 comments
Open
1 task done

aws cdk support #1387

Hebilicious opened this issue Jul 3, 2023 · 0 comments

Comments

@Hebilicious
Copy link
Contributor

Hebilicious commented Jul 3, 2023

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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant