AWS CDK provider #171
Describe the solution you'd like
Currently Amplify only supports direct CloudFormation as a provider, and does so by using JSON templates. I read somewhere that other providers can be implemented, and that a future goal is to support multiple providers. It would be great to have an AWS CDK provider, that constructs similar features, but in CDK code.
I feel like this would make it easier to implement new features in Amplify, leveraging common usecases and improvements (eg. asset upload, AWS SAM transformations, YAML output, etc)
Currently I wasn't able to find much of any information/documentation on what is required to implement a custom/new provider, so maybe documenting that/making it easier to discover would be useful as part of this also.
Describe alternatives you've considered
Using AWS CDK / SAM separately, and/or consuming externally generated resources through exports.
See also: #160
The text was updated successfully, but these errors were encountered:
Hi there, just adding my 2p,
In my (admittedly biased) opinion, the CDK would make it far easier to define stacks, while still allowing raw CloudFormation template generation. As it stands currently, to implement the CDK would require changes to each individual
Converting to the CDK would have be a significant effort since each
It also becomes far easier to create and test custom resources. The only example I can think of right now is in
The CDK provides a "diff" feature by using CloudFormation ChangeSets, this has the potential to move technical debt out of Amplify CLI. Alternatively, Amplify could format output from CDK to perhaps make it more user-friendly. Fixes #366.
With all the above said though, AWS-CDK isn't the most straightforward library/framework/kit(?) to integrate with/wrap around. Also, since it is currently still in pre-release, the serialization protocol that the CDK CLI uses is unstable (last I checked), which could introduce problems down the line.
Given that both Amplify and CDK are AWS projects, it would be great to see some dogfooding here. Both these products are HUGE for developer productivity in my opinion, and any wins with respect to maintenance will continue to pay off in the long run (for both Amplify maintainers and users).
First off, @hassankhan really nice break down.
To build off of this issue, I've worked enough with both amplify and cdk now be considering converting an app (which is currently in development) to using cdk instead of amplify's environment building. I need more flexibility which is more of a me problem than an amplify problem but I'm finding myself doing really tricky operations to get things to work like I need it to.
One thing I'd like to propose is, why can't both of these tools live separately but compliment each other better? This might be the easiest path forward.
I'd love to see a cdk + amplify partnership/crossover/something in the near future. Love what has been said so far. Right now, I am starting another project and am going to use the cdk exclusively. I am finding I miss the way amplify made things easy for the initial setup of an app, specifically api + auth + lambda + dynamodb. If there were a few simple cdk stacks you could generate with amplify that would be really helpful.
Hello as noted above we have integrated CDK into Amplify CLI last year and introduced override behavior:
We're also investigating some of the other sub-functionalities embedded in this issue such as drift detection and change sets. For now we will close this feature request but please open a new issue if you have additional feedback around these areas.