This repository contains a set of AWS Cloud Development Kit Python examples with architecture diagrams for frequently used AWS services.
Example | Description | Tags |
---|---|---|
api-gateway/cognito-api-lambda | api-gateway, cognito, lambda | |
api-gateway/dynamodb | api-gateway, dynamodb | |
api-gateway/dynamodb-cognito | api-gateway, cognito, dynamodb | |
api-gateway/http-dynamodb-crud-api | api-gateway(HTTP API), dynamodb, lambda | |
api-gateway/kds-proxy | api-gateway, kinesis data streams | |
api-gateway/kds-proxy-cognito | api-gateway, cognito, kinesis data streams | |
api-gateway/logging-api-calls-to-firehose | api-gateway, kinesis data firehose | |
api-gateway/logging-api-calls-to-cloudwatch-logs | api-gateway, cloudwatch logs subscription filters with kinesis data firehose | |
athena | athena (named query, work group), s3 | |
batch/batch-with-ec2 | Launch AWS Batch | aws batch |
bedrock/opensearch-serverless | Launch Knowledge Bases for Amazon Bedrock using Amazon OpenSearch Serverless as a vector store | amazon bedrock, knowledge bases, opensearch serverless |
bedrock/generative-ai-cdk-constructs | Launch Knowledge Bases for Amazon Bedrock | amazon bedrock, knowledge bases |
cloud9 | cloud9 | |
cloudfront/static-site | cloudfront | |
custom-resources/sagemaker-jumstart-model-deploy | Deploy SageMaker JumpStart Model with CDK Custom Resources | sagemaker jumpstart, cdk custom-resources |
dms/aurora_mysql-to-kinesis | dms, mysql, kinesis | |
dms/aurora_mysql-to-s3 | dms, mysql, s3 | |
dms-serverless/aurora_mysql-to-kinesis | dms serverless, mysql, kinesis | |
dms-serverless/aurora_mysql-to-s3 | dms serverless, mysql, s3 | |
documentdb | documentdb(docdb), secerts manager, sagemaker | |
documentdb-elastic-clusters | documentdb elastic clusters(docdb-elastic), secerts manager | |
dynamodb | dynamodb | |
ec2/vpc | vpc | |
ec2/import-existing-vpc | vpc | |
ec2/jenkins-on-ec2 | jenkins, ec2 | |
ec2/jupyter-on-dlami | Launch Jupyter Server on Amazon Deep Learning AMI | jupyter, ec2, DLAMI |
ec2/dlami-wth-aws-neuron | Launch Jupyter Server on Amazon Deep Learning AMI with AWS Neuron | jupyter, ec2, DLAMI, AWS Neuron |
ec2/stable-diffusion-webui-on-dlami | ![]() |
Stable Diffusion WebUI, ec2, DLAMI |
ecr | upload Docker image into Amazon ECR Repository | ecr |
ecs-patterns/alb-fargate-service | ecs patterns, Application Loadbalancer Fargate Service | |
ecs-patterns/nlb-fargate-service | ecs patterns, Network Loadbalancer Fargate Service | |
elasticache/redis | redis | |
elasticache/redis-primary-replica | redis primary-replica cluster | |
elasticache/redis-cluster | redis-cluster | |
elasticache-serverless/serverless-redis-cluster | ElastiCache Serverless for Redis | |
elasticsearch | elasticsearch | |
opensearch/cfn-domain | opensearch created with cdk.aws_opensearch.CfnDomain construct | |
opensearch/domain | opensearch created with cdk.aws_opensearch.Domain construct | |
opensearch-serverless/search | opensearch serverless for search usecases | |
opensearch-serverless/time-series | opensearch serverless for time series analysis | |
opensearch-serverless/vpc-endpoint | opensearch serverless in VPC | |
opensearch-serverless/kinesis-firehose | data ingestion to opensearch serverless using kinesis firehose | |
opensearch-ingestion/opensearch | data ingestion to opensearch domain using OpenSearch Ingestion Pipelines | |
opensearch-ingestion/opensearch-serverless | data ingestion to opensearch serverless using OpenSearch Ingestion Pipelines | |
emr | emr, Hive, Spark, JupyterHub, Hudi, Iceberg | |
emr-serverless | emr serverless | |
emr-studio | Launch an Amazon EMR Studio | emr studio |
glue/cdc-parquet-to-apache-iceberg | aws glue, Apache Iceberg, Parquet | |
glue/cdc-streams-to-apache-iceberg | aws glue streaming, Apache Iceberg | |
glue/streaming-etl/sink-to-s3 | aws glue streaming, kinesis data streams, s3, parquet | |
glue/streaming-etl/sink-to-deltalake | aws glue streaming, kinesis data streams, s3, Delta Lake | |
glue/streaming-etl/sink-to-hudi | aws glue streaming, kinesis data streams, s3, Apache Hudi | |
glue/streaming-etl/sink-to-iceberg | aws glue streaming, kinesis data streams, s3, Apache Iceberg | |
glue/streaming-etl/kafka-to-iceberg | aws glue streaming, Managed Service for Apache Kafka (MSK), s3, Apache Iceberg | |
glue/streaming-etl/msk-serverless-to-iceberg | aws glue streaming, MSK Serverless, s3, Apache Iceberg | |
kendra/webcrawler-datasource | kendra, lambda | |
keyspaces-cassandra | amazon keyspaces, cassandra | |
kinesis-data-firehose/data-transform | kinesis firehose, lambda, s3, schema-validation | |
kinesis-data-firehose/dynamic-partitioning/inline | kinesis firehose, s3, dynamic-partitioning, jq | |
kinesis-data-firehose/dynamic-partitioning/lambda | kinesis firehose, s3, dynamic-partitioning, lambda | |
kinesis-data-firehose/ekk-stack | kinesis firehose, s3, Elasticsearch, bastion host | |
kinesis-data-firehose/opskk-stack | kinesis firehose, s3, OpenSearch, bastion host | |
kinesis-data-firehose/msk-firehose-s3-stack | msk, kinesis firehose, s3, bastion host | |
kinesis-data-firehose/msk-serverless-firehose-s3-stack | msk serverless, kinesis firehose, s3, bastion host | |
kinesis-data-streams/to-kinesis-data-firehose | kinesis data streams, kinesis firehose, s3 | |
kinesis-data-analytics-for-flink/msk-replication | kinesis data analytics for flink, msk | |
lakeformation | Granting AWS Lake Formation permissions on Data Catalog Resources | glue data catalog, lakeformation |
lambda/alb-lambda | lambda, application load balancer | |
lambda/alb-path-routing-lambda | lambda, application load balancer | |
lambda/async-invoke | lambda, sns, event-bridge | |
lambda/lambda-custom-container | lambda, ecr, custom container | |
memorydb-for-redis | memorydb | |
memorydb-for-redis for vector search | memorydb for vector search | |
msk | msk(kafka) | |
msk_aplha | msk(kafka) | |
msk-serverless | msk serverless(kafka) | |
mwaa(airflow) | mwaa(airflow) | |
neptune | sagemaker, neptune | |
rds/aurora_mysql | aurora mysql, secrets manager | |
rds/aurora_postgresql | aurora postgresql, secrets manager | |
rds/mariadb | mariadb, secrets manager | |
rds/rds_proxy-aurora_mysql | rds-proxy, aurora mysql, secrets manager | |
rds/nginx-rds_proxy-aurora_mysql | NGINX, aurora mysql, secrets manager | |
rds/sagemaker-aurora_mysql | aurora mysql, secrets manager, sagemaker notebook | |
rds/sagemaker-aurora_postgresql | aurora postgresql, secrets manager, sagemaker notebook | |
rds/sagemaker-studio-aurora_postgresql | aurora postgresql, secrets manager, sagemaker studio in vpc | |
aurora_serverless_v1/aurora_mysql-serverless_v1 | aurora mysql serverless v1 cluster, secrets manager | |
aurora_serverless_v2/aurora_mysql-serverless_v2-replica | aurora mysql serverless v2, aurora mysql, secrets manager | |
aurora_serverless_v2/aurora_postgresql-serverless_v2 | aurora postgresql serverless v2 cluster, secrets manager | |
redshift/cfn | redshift | |
redshift/alpha | redshift | |
redshift-serverless | redshift-serverless | |
redshift-streaming-ingestion/from-kinesis | redshift streaming ingestion from kinesis | |
redshift-streaming-ingestion/from-msk | redshift streaming ingestion from msk | |
redshift-streaming-ingestion/from-msk-serverless | redshift streaming ingestion from msk serverless | |
sagemaker/notebook | Launch an Amazon SageMaker Notebook Instance | sagemaker notebook instance |
sagemaker/studio | ![]() |
sagemaker studio |
sagemaker/studio-in-vpc | ![]() |
sagemaker studio in a Private VPC |
sagemaker/fsx-lustre | Training Jobs with FileSystemInput using Amazon FSx for Lustre | sagemaker studio, FSx for Lustre (FSxLustre) |
sagemaker/sagemaker-glue | sagemaker studio, aws glue | |
sagemaker/mlflow-ec2-sagemaker | MLflow, sagemaker studio | |
sagemaker/mlflow-ecs-sagemaker | MLflow, ecs, fargate, sagemaker studio | |
sagemaker-async-inference/jumpstart | Asynchronous Inference using SageMaker JumpStart | sagemaker async endpoint, jumpstart |
sagemaker-async-inference/hugging-face | Asynchronous Inference using Hugging Face DLC | sagemaker async endpoint, hugging face |
sagemaker-async-inference/pytorch | Asynchronous Inference using PyTorch DLC | sagemaker async endpoint, pytorch |
sagemaker-realtime-inference/jumpstart | Real-time Inference using SageMaker JumpStart | sagemaker real-time endpoint, jumpstart |
sagemaker-realtime-inference/hugging-face | Real-time Inference using Hugging Face DLC | sagemaker real-time endpoint, hugging face |
sagemaker-realtime-inference/pytorch | Real-time Inference using PyTorch DLC | sagemaker real-time endpoint, pytorch |
sagemaker-inference-component | ![]() |
sagemaker real-time endpoint, inference component, multiple FMs on the same instance |
Enjoy!
npm install -g aws-cdk
Install the AWS CDK Toolkit (thecdk
command).npm install -g aws-cdk@latest
Install the latest AWS CDK Toolkit (thecdk
command).cdk init app --language python
Create a new, empty CDK Python project.cdk bootstrap --profile <AWS Profile>
Deploys the CDK Toolkit staging stack; see Bootstrapping
This repository is huge, containing a vast number of files, making it a monorepo
.
Consequently, if you wish to fetch specific source directories instead of downloading the entire repository,
we recommend using the git sparse-checkout
command.
For example, let's say you want to clone the cognito-api-lambda
project in api-gateway
directory.
In that case, open your terminal and run the following command.
git clone https://github.com/ksmin23/my-aws-cdk-examples.git
cd my-aws-cdk-examples
git sparse-checkout init --cone
git sparse-checkout set api-gateway/cognito-api-lambda
ℹ️ For more information about git sparse-checkout
, see this article.
- Working with the AWS CDK
- Your first AWS CDK app
- AWS CDK v2 Reference Documentation
- AWS CDK Toolkit (cdk command)
- AWS CDK Workshop
- Construct Hub: Open-source CDK libraries
- aws-samples/aws-cdk-examples
- CDK Resources - A collection of tools to help during the development of CDK applications.
- Awesome CDK - Curated list of awesome AWS Cloud Development Kit (AWS CDK) open-source projects, guides, blogs and other resources.
- AWS CloudFormation quotas - Check out AWS CloudFormation quotas when you encounter limitation errors when authoring templates and creating stacks.