Read and navigate through the Typescript docs so that you know what relevant arguments are and what type their values need to be, and then rely on your IDE's autocompletion to get the Python syntax right. If you use an IDE without autocompletion, click over to the Python version of the docs to get the correct snake casing of the arguments. You are pretty smart. You will catch on really fast.
The best way to get AWS CDK Python documentation is to learn to read and translate the Typescript documentation. Really.
Read and navigate through the Typescript docs so that you know what relevant arguments are and what type their values need to be, and then rely on your IDE's autocompletion to get the Python syntax right.
If you use an IDE without autocompletion, click over to the Python version of the docs to get the correct snake casing of the arguments.
You are pretty smart. You will catch on really fast.
My name is Jakob and I am a DevOps Engineer. I used to be a lot of other things as well (Dish Washer, Retail Employee, Camp Counselor, Army Medic, Infectious Disease Researcher), but now I am a DevOps Engineer. I received no formal CS education but I'm not self taught, because I had thousands of instructors who taught me through their tutorials and blog posts. The culture of information sharing within the software engineering community is vital to everyone, especially those like me who didn't have other options. So, as I learn new things I will be documenting them through the eyes of someone learning for the first time, because those are the people most in need of a guide. Happy Learning! And don't be a stranger.
Note: I am NOT going to be sourcing and fact checking everything here. This is not an O'Reilly book. The language and descriptions are intended to allow beginners to understand. If you want to be pedantic about details or critique my framing of what something is or how it works feel free to write your own post about it. These posts are intended to be enough to get you started so that you can begin breaking things in new ways on your own!
Python documentation for the AWS CDK stinks. It's not good at all.
Here is an example of the Python documentation for an EKS Custer. It tells you all of the arguments, and whether they are optional, that you can use to customize your EKS Cluster. What more could you want?
Well what if you want to specify an
alb_controller for your cluster?
Union[AlbControllerOptions, Dict[str, Any], None] of course.. Wait what? tell me more! No! Python documentation doesn't supply links to anything!
Now let's compare that to the Typescript documentation.
It contains all the relevant information but includes links to all the subclasses that you may need to reference. ALB Controller options? They look like this!
And what of ALB Versions? Whats available? Just click on that link!
They Typescript documentation is just so much more rich.
So here is my advice. Just use the Typescript documentation as your main source. Will it take a little bit of time to get the hang of reading Typescript documentation then writing your CDK code in Python? yeah, but I know you are up to the challenge. A fully featured IDE will help with auto-completion and worst case if a particular class is giving you trouble you can follow the link to the Python docs, resolve your issue, and go back to the Typescript docs.
It is a bummer that the Python documentation for the AWS CDK lacks the interactivity of the Typescript documentation, but by learning to read in Typescript you are not only making your CDK building in Python easier for yourself, but also learning some Typescript along the way!
Top comments (0)