<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: pujaaan</title>
    <description>The latest articles on DEV Community by pujaaan (@pujaaan).</description>
    <link>https://dev.to/pujaaan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3883266%2F670433d9-2c20-457a-8204-b15ad8c1801b.png</url>
      <title>DEV Community: pujaaan</title>
      <link>https://dev.to/pujaaan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pujaaan"/>
    <language>en</language>
    <item>
      <title>I got tired of writing the same CDK wiring, so I built simple-cdk</title>
      <dc:creator>pujaaan</dc:creator>
      <pubDate>Thu, 16 Apr 2026 23:37:08 +0000</pubDate>
      <link>https://dev.to/pujaaan/i-got-tired-of-writing-the-same-cdk-wiring-so-i-built-simple-cdk-obg</link>
      <guid>https://dev.to/pujaaan/i-got-tired-of-writing-the-same-cdk-wiring-so-i-built-simple-cdk-obg</guid>
      <description>&lt;h2&gt;
  
  
  I got tired of writing the same CDK wiring, so I built simple-cdk
&lt;/h2&gt;

&lt;p&gt;Most of the AWS backends I build end up looking the same. A few Lambdas. A few DynamoDB tables. An AppSync API on top. Cognito for auth. Maybe an RDS instance. A bundle of outputs the frontend reads at startup so it knows where everything lives.&lt;/p&gt;

&lt;p&gt;None of it is hard. It's just &lt;em&gt;repetitive&lt;/em&gt;. Every new project starts with the same several hundred lines of CDK — the same &lt;code&gt;Function&lt;/code&gt; definitions, the same &lt;code&gt;GraphqlApi&lt;/code&gt; setup, the same &lt;code&gt;grantReadWriteData&lt;/code&gt; calls, the same VPC and secret for RDS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;simple-cdk&lt;/strong&gt; is what I built so I could stop writing that code.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is
&lt;/h2&gt;

&lt;p&gt;A thin layer on top of AWS CDK. You describe your app once in a single config file, drop your code into a few conventional folders, and it turns into a deployable serverless stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lambda functions&lt;/li&gt;
&lt;li&gt;DynamoDB tables (with GSIs, TTL, streams)&lt;/li&gt;
&lt;li&gt;An AppSync GraphQL API with auto-generated CRUD resolvers&lt;/li&gt;
&lt;li&gt;A Cognito user pool with triggers&lt;/li&gt;
&lt;li&gt;An RDS instance with a managed VPC and secret&lt;/li&gt;
&lt;li&gt;A single SSM parameter the frontend reads to discover all of the above&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  your code              backend/functions/hello/handler.ts
                         backend/models/todo.model.ts
                         backend/triggers/pre-sign-up/handler.ts
                         schema.graphql
                              │
                              ▼
  adapters                 lambda • dynamodb • appsync
                           cognito • rds • outputs
                              │
                              ▼
  AWS CDK                  Lambda + DynamoDB + AppSync
                           + Cognito + RDS + SSM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You drop files in conventional folders. Each adapter scans the folder it owns, turns what it finds into CDK constructs, and a wiring step at the end connects everything together. No decorators, no registry, no magic — discovery is just listing files in a folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  Less boilerplate
&lt;/h2&gt;

&lt;p&gt;A Lambda plus a DynamoDB table the Lambda can read and write is roughly thirty lines of CDK. Multiply that by every function, table, trigger, and resolver in a typical backend and you're at several hundred lines of wiring before you've written any business logic.&lt;/p&gt;

&lt;p&gt;In simple-cdk the same setup is two files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;backend/models/todo.model.ts       # export default { pk: { name: 'id' } }
backend/functions/create-todo/handler.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just write the code — simple-cdk picks it up. IAM grants, Cognito triggers, AppSync resolvers, RDS access — the things you used to wire by hand are derived from the files you've already written.&lt;/p&gt;

&lt;h2&gt;
  
  
  simple-cdk vs Amplify vs raw CDK
&lt;/h2&gt;

&lt;p&gt;Amplify gets you scaffold-and-go ergonomics, but every project I built with it eventually hit something Amplify wouldn't let me do — a custom resource, a policy I needed to edit, an opinion I couldn't override. Once you start fighting Amplify you're rewriting half your infra in CDK anyway.&lt;/p&gt;

&lt;p&gt;Raw CDK is the opposite. It takes no opinions, which means &lt;em&gt;I&lt;/em&gt; have to take all of them, every project, from scratch.&lt;/p&gt;

&lt;p&gt;simple-cdk picks the rote defaults so you don't have to. It's built directly on AWS CDK — if you already know CDK, there's nothing new to learn, and no framework to reverse-engineer when something goes wrong. Built-in adapters are replaceable, you can write your own in a handful of lines, and you can drop into raw CDK in the wiring step at any time. No proprietary asset format, no managed service. If you decide you hate simple-cdk, throw it away and keep the underlying CDK.&lt;/p&gt;

&lt;h2&gt;
  
  
  When NOT to use it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;You're building non-serverless workloads (ECS, EKS, EC2-heavy)&lt;/li&gt;
&lt;li&gt;You have an existing CDK codebase you're already happy with&lt;/li&gt;
&lt;li&gt;You want a fully managed full-stack framework that hosts the frontend too — Amplify is still the better choice there&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;my-app &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;cd &lt;/span&gt;my-app
npx simple-cdk@latest init
npx simple-cdk deploy &lt;span class="nt"&gt;--stage&lt;/span&gt; dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repo: &lt;a href="https://github.com/pujaaan/simple-cdk" rel="noopener noreferrer"&gt;https://github.com/pujaaan/simple-cdk&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PRs and issues welcome.&lt;/p&gt;

</description>
      <category>aws</category>
      <category>serverless</category>
      <category>showdev</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
