explaingit

aws-samples/aws-cdk-examples

5,590PythonAudience · ops devopsComplexity · 3/5LicenseSetup · moderate

TLDR

A collection of official AWS CDK example projects in TypeScript, Python, Java, C#, and Go, copy-paste infrastructure patterns for common AWS setups like servers, databases, and storage.

Mindmap

mindmap
  root((aws-cdk-examples))
    What it does
      CDK infrastructure patterns
      Multi-language examples
      Copy-paste AWS setups
    Tech Stack
      AWS CDK
      TypeScript
      Python
      Java Go C#
    Use Cases
      Bootstrap new infra
      Learn CDK patterns
      Contribute examples
    Audience
      DevOps engineers
      Cloud developers
    License
      Apache 2.0 permissive
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Find a working CDK example for a specific AWS service (like Lambda, RDS, or S3) and adapt it as a starting point for your own infra.

USE CASE 2

Learn how to define AWS infrastructure in Python or TypeScript code instead of clicking through the AWS console.

USE CASE 3

Contribute a new CDK example pattern to the official AWS samples collection for the community.

USE CASE 4

Compare how the same AWS infrastructure pattern is written in different programming languages (Python vs TypeScript vs Go).

Tech stack

PythonTypeScriptJavaGoC#AWS CDK

Getting it running

Difficulty · moderate Time to first run · 30min

Requires an AWS account, AWS CLI credentials configured, and CDK CLI installed, assumes prior CDK familiarity.

Apache 2.0, use and modify freely for any purpose, including commercial, as long as you include the license notice.

In plain English

This repository is a collection of example projects from Amazon Web Services showing how to use the AWS Cloud Development Kit, commonly called CDK. The CDK is a tool that lets developers define cloud infrastructure, things like servers, databases, and storage, using code instead of through a web dashboard or configuration files. These examples show common patterns and setups that you might want to replicate for your own projects. The examples are organized by programming language. The collection covers TypeScript, Python, C# (.NET), Java, and Go, with the goal of eventually having the same set of examples available in each language. Each example demonstrates a particular service setup or infrastructure arrangement that you could adapt for your own use. Amazon describes this as an intermediate learning resource. The README suggests reading the CDK Developer Guide or completing the CDK Workshop before diving into these examples, since they assume some familiarity with the CDK already. Links to both of those resources, along with the API reference and a community resource list, are included in the README. There is also a small section listing larger, more complete example applications hosted in separate repositories. These go beyond the individual service examples and show entire applications built with CDK, combining multiple AWS services together. The project is maintained by AWS and welcomes contributions: either fixes to existing examples or new examples added in any of the supported languages. The code is licensed under the Apache 2.0 license, which allows free use and modification.

Copy-paste prompts

Prompt 1
I want to deploy an AWS Lambda function behind an API Gateway using CDK in Python. Find me the closest example in aws-cdk-examples and show me how to adapt it.
Prompt 2
Show me a CDK TypeScript example that creates an RDS PostgreSQL database inside a VPC with a security group allowing access only from a Lambda function.
Prompt 3
I'm new to AWS CDK. Which examples in aws-cdk-examples should I start with after completing the CDK Workshop, and in what order?
Prompt 4
How do I add a new example to aws-cdk-examples? What folder structure and README format does the project expect?
Open on GitHub → Explain another repo

← aws-samples on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.