aws / aws-cdk

The AWS Cloud Development Kit is a framework for defining cloud infrastructure in code
https://aws.amazon.com/cdk
Apache License 2.0
11.68k stars 3.93k forks source link

CLI: Native binaries #31497

Open floverfelt opened 1 month ago

floverfelt commented 1 month ago

Describe the feature

Have the aws-cdk-cli be compiled to native binaries or native packages.

Use Case

Similar to some of the use cases described here: https://github.com/aws/aws-cdk/issues/15851

We use the CDK cli quite a bit and use it to dynamically provision stacks on a variety of build machines/OS's in rigidly defined environments which often don't have access to Docker/containers. Having the cdk cli work as a node and npm package is rather cumbersome as you have to install node, npm, and then run an install script. Since it's recommended to install globally, this also makes upgrading/managing multiple versions tricky. We don't use JS/TS for our stack definitions, so we'll often have to install or package node and npm for just this tool.

It would be nice to have the cdk-cli compiled or packaged in a "native" way so that we could simply distribute the binaries instead of having to manage the installs ourselves. These could come prepackaged with the recommended node/npm versions for that release of the cdk-cli.

Proposed Solution

Multiple tools exist to do native packaging of node applications: https://github.com/vercel/pkg https://github.com/nexe/nexe https://docs.deno.com/runtime/reference/cli/compiler/ https://nodejs.org/api/single-executable-applications.html

I'm not a Node/JS dev, so I'm not sure how much work it would be to package the aws-cdk-cli in this way.

Other Information

No response

Acknowledgements

CDK version used

2.154.1

Environment details (OS name and version, etc.)

Windows, Linux, Mac

pahud commented 1 month ago

Thank you for your feedback and use case sharing. Please help us prioritize with 👍. Thanks!