-
Notifications
You must be signed in to change notification settings - Fork 246
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): Information for Requesting Deno Support #3938
Comments
I would like to add to this. The biggest benefit is the nature of the cdk in that you want infrastructure as code but why do you need to compile code first. Thats just a a side effect of how typescript works with node. With deno you could basically just generate a single TypeScript file, cdk config and a README.md and then you are god to go. No compile step. Dependencies are declared inside the TypeScript file etc. Its the perfect tool for CDK. Deno is also super simple to install. The deno engine could probably be embedded as well. There could be a cdk-ts that basically didn't even need deno installed it just had a TS as input. That would be awesome. |
Thanks for the issue @shellscape I'll convert this to a feature request since its requesting new support. Feel free to update your description accordingly. We prioritize by community feedback so +1 👍🏻 the issue if you'd like to see this worked. |
You do not have to, you can choose to use |
This issue has received a significant amount of attention so we are automatically upgrading its priority. A member of the community will see the re-prioritization and provide an update on the issue. |
So I see that this has gotten a few +1s. It's one of those long-living tracking issues though, and some of the other issues labeled |
Odd considering it's probably the easiest lateral move with the least amount of effort needed from the current Node support. |
Can I suggest a bit of a review into it? Deno is literally the successor to Node, written by the same creator (Ryan Dahl), and in a stable form used by an increasingly growing number of developers. And like shellscape pointed out, it's a very, very easy transition. The reason this post got so much attention is because a lot of devs (like myself) are waiting for basically this final piece to start transitioning all of our business apps into Deno. |
if you need help get this running: i am happy to invest some time into it. |
I wish I could run cdk using deno. It seems to me that this could slim down the configuration a lot. |
The newly released Deno 1.28 has npm support out of the box. It's incredibly tempting to be able to run CDK without needing to install anything at all. The npm support would probably make it a lot simpler to integrate with CDK.
I'd be hard pressed to call Deno a language. It's Typescript, and even compatible with the web. It has it's own API on the |
It seems that a simple CDK project can already be made to work with Deno (including CDK CLI). // deno.jsonc
{
"tasks": {
"cdk": "deno run --allow-all npm:aws-cdk --app 'deno run --allow-all main.ts'",
"test": "deno test --allow-all",
"ci": "deno fmt --check && deno lint && deno task test"
},
"lint": {
"files": {
"exclude": ["cdk.out"]
}
},
"fmt": {
"files": {
"exclude": ["cdk.out"]
}
}
} // main.ts
import cdk from "npm:aws-cdk-lib";
const app = new cdk.App();
export const stack = new cdk.Stack(app, "DenoCdkStack");
new cdk.aws_logs.LogGroup(stack, "DenoCdkLogGroup"); // main.test.ts
import { assertSnapshot } from "https://deno.land/std@0.167.0/testing/snapshot.ts";
import { Template } from "npm:aws-cdk-lib/assertions";
import { stack } from "./main.ts";
Deno.test("Snapshot Test", async (t) => {
await assertSnapshot(t, Template.fromStack(stack).toJSON());
}); $ deno task cdk synth
$ deno task test [Edit] |
fwiw I got this to work:
// deno.jsonc
...
"deploy": "deno run --allow-all npm:aws-cdk deploy"
... then I called it via: deno task deploy --app cdk.out --profile foo what worked for me was Reading the default profile from Only thing that worked was copying the default profile to something else ( 🤷🏻 |
This issue should be tracked in jsii. Please note that although we do not have the bandwidth to take this on, we do accept community contributions so if anyone really wants to see this happen, feel free to start an RFC on this. |
Thanks for your reply and suggestion. Seeing how this thread is going I agree it should be picked up by the Deno community themselves I think. Just a check question: even though Deno supports Typescript natively you think there still should be a separate JSII implementation? What would this add over the existing one for Typescript? I am trying to wrap my head around where this would fit and how we would start on this RFC. :) |
There are numerous aspects to this, and this issue could hide multiple things in reality... Most of the comments appear to ask for ability to natively use Now - if there's a broader ask of being able to use We are currently busy on other projects, but would welcome community contributions on that front. Note however that it'd be very useful for any work in that space to bring in new integration tests run with |
note the asw-cdk package works on deno |
General Issue
Information for Requesting Deno Support
The Question
I'd like to know what the proper procedures and steps are required to start the discussion around formal support for Deno (https://deno.land). Deno is an alternative to Node that supports TypeScript and ESM natively. While it's a close cousin, many of the mechanisms have significant differences, namely dependency management. Presently, to make use of AWS CDK for Deno apps, users must run Node along side Deno.
I'd like to propose Deno support for AWS CDK, as it's already authored in TypeScript for Node support, but I'm honestly not sure where to begin.
CDK CLI Version
1.131.0
Framework Version
No response
Node.js Version
No response
OS
No response
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: