ksmin23 / my-aws-cdk-examples

A collection of AWS CDK Python examples with architecture diagrams for frequently used AWS services
110 stars 31 forks source link
aws-cdk aws-cdk-python cdk cdk-examples

AWS CDK Python Examples

Stats Python

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 amazon-cognito-api-lambda api-gateway, cognito, lambda
api-gateway/dynamodb apigw-dynamodb-arch api-gateway, dynamodb
api-gateway/dynamodb-cognito apigw-cognito-dynamodb-arch api-gateway, cognito, dynamodb
api-gateway/http-dynamodb-crud-api http-dynamodb-crud-api api-gateway(HTTP API), dynamodb, lambda
api-gateway/kds-proxy apigw-kds-proxy-arch api-gateway, kinesis data streams
api-gateway/kds-proxy-cognito apigw-kds-proxy-cognito-arch api-gateway, cognito, kinesis data streams
api-gateway/logging-api-calls-to-firehose logging-api-calls-to-firehose api-gateway, kinesis data firehose
api-gateway/logging-api-calls-to-cloudwatch-logs logging-api-calls-to-cloudwatch-logs api-gateway, cloudwatch logs subscription filters with kinesis data firehose
athena athena-arch 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 cloud9
cloudfront/static-site cloudfront-s3-static-site-arch cloudfront
cognito Deploy Amazon Cognito that is an identity platform for web and mobile apps cognito
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-to-kinesis-arch dms, mysql, kinesis
dms/aurora_mysql-to-s3 dms-mysql-to-s3-arch dms, mysql, s3
dms-serverless/aurora_mysql-to-kinesis dms_serverless-mysql-to-kinesis-arch dms serverless, mysql, kinesis
dms-serverless/aurora_mysql-to-s3 dms_serverless-mysql-to-s3-arch dms serverless, mysql, s3
documentdb documentdb-sagemaker-arch documentdb(docdb), secerts manager, sagemaker
documentdb-elastic-clusters docdb-elastic-arch documentdb elastic clusters(docdb-elastic), secerts manager
dynamodb dynamodb-arch dynamodb
ec2/vpc aws-vpc vpc
ec2/import-existing-vpc aws-existing-vpc vpc
ec2/jenkins-on-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_Screenshot Stable Diffusion WebUI, ec2, DLAMI
ecr upload Docker image into Amazon ECR Repository ecr
ecs-patterns/alb-fargate-service ecs-alb-fargate-service-arch ecs patterns, Application Loadbalancer Fargate Service
ecs-patterns/nlb-fargate-service ecs-nlb-fargate-service-arch ecs patterns, Network Loadbalancer Fargate Service
elasticache/redis elasticache-redis-arch redis
elasticache/redis-primary-replica elasticache-redis-primary-replica-arch redis primary-replica cluster
elasticache/redis-cluster elasticache-redis-cluster-arch redis-cluster
elasticache-serverless/serverless-redis-cluster elasticache-serverless-for-redis-cluster-arch ElastiCache Serverless for Redis
elasticsearch amazon-es-arch elasticsearch
opensearch/cfn-domain amazon-opensearch-arch opensearch created with cdk.aws_opensearch.CfnDomain construct
opensearch/domain amazon-opensearch-arch opensearch created with cdk.aws_opensearch.Domain construct
opensearch-serverless/search opensearch-serverless-search-type opensearch serverless for search usecases
opensearch-serverless/time-series opensearch-serverless-timeseries-arch opensearch serverless for time series analysis
opensearch-serverless/vpc-endpoint opensearch-serverless-vpc-endpoint-arch opensearch serverless in VPC
opensearch-serverless/kinesis-firehose opensearch-serverless-firehose-arch data ingestion to opensearch serverless using kinesis firehose
opensearch-ingestion/opensearch osis-domain-pipeline data ingestion to opensearch domain using OpenSearch Ingestion Pipelines
opensearch-ingestion/opensearch-serverless osis-collection-pipeline data ingestion to opensearch serverless using OpenSearch Ingestion Pipelines
emr amazon-emr-on_demand emr, Hive, Spark, JupyterHub, Hudi, Iceberg
emr-serverless amazon-emr-serverless emr serverless
emr-studio Launch an Amazon EMR Studio emr studio
glue/cdc-parquet-to-apache-iceberg glue-job-cdc-parquet-to-iceberg-arch aws glue, Apache Iceberg, Parquet
glue/cdc-streams-to-apache-iceberg glue-streaming-cdc-to-iceberg-table aws glue streaming, Apache Iceberg
glue/streaming-etl/sink-to-s3 glue-streaming-ingestion-from-kinesis-to-s3-arch aws glue streaming, kinesis data streams, s3, parquet
glue/streaming-etl/sink-to-deltalake glue-streaming-ingestion-from-kinesis-to-deltalake-arch aws glue streaming, kinesis data streams, s3, Delta Lake
glue/streaming-etl/sink-to-hudi glue-streaming-ingestion-from-kinesis-to-hudi-arch aws glue streaming, kinesis data streams, s3, Apache Hudi
glue/streaming-etl/sink-to-iceberg glue-streaming-ingestion-from-kinesis-to-iceberg-arch aws glue streaming, kinesis data streams, s3, Apache Iceberg
glue/streaming-etl/kafka-to-iceberg glue-streaming-ingestion-from-msk-to-iceberg-arch aws glue streaming, Managed Service for Apache Kafka (MSK), s3, Apache Iceberg
glue/streaming-etl/msk-serverless-to-iceberg glue-streaming-ingestion-from-msk-serverless-to-iceberg-arch aws glue streaming, MSK Serverless, s3, Apache Iceberg
kendra/webcrawler-datasource firehose_data_transform kendra, lambda
keyspaces-cassandra amazon_keyspaces-arch amazon keyspaces, cassandra
kinesis-data-firehose/data-transform firehose_data_transform kinesis firehose, lambda, s3, schema-validation
kinesis-data-firehose/dynamic-partitioning/inline firehose_dynamic_partition_with_inline kinesis firehose, s3, dynamic-partitioning, jq
kinesis-data-firehose/dynamic-partitioning/lambda firehose_dynamic_partition_with_lambda kinesis firehose, s3, dynamic-partitioning, lambda
kinesis-data-firehose/ekk-stack amazon-ekk-stack-arch kinesis firehose, s3, Elasticsearch, bastion host
kinesis-data-firehose/opskk-stack amazon-opskk-stack-arch kinesis firehose, s3, OpenSearch, bastion host
kinesis-data-firehose/msk-firehose-s3-stack msk-firehose-s3-arch msk, kinesis firehose, s3, bastion host
kinesis-data-firehose/msk-serverless-firehose-s3-stack msk-serverless-firehose-s3-arch msk serverless, kinesis firehose, s3, bastion host
kinesis-data-firehose/firehose-to-iceberg-stack firehose-to-iceberg-arch kinesis firehose, lambda, s3, Apache Iceberg
kinesis-data-streams/to-kinesis-data-firehose amazon-ekk-stack-arch kinesis data streams, kinesis firehose, s3
kinesis-data-analytics-for-flink/msk-replication kda-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 aws-alb-lambda lambda, application load balancer
lambda/alb-path-routing-lambda alb-path-routing-lambda lambda, application load balancer
lambda/async-invoke aws-lambda-async-invocation lambda, sns, event-bridge
lambda/lambda-custom-container aws-lambda-custom-container lambda, ecr, custom container
memorydb-for-redis memorydb-for-redis memorydb
memorydb-for-redis for vector search memorydb-for-redis-for-vectorsearch memorydb for vector search
msk msk-arch msk(kafka)
msk_aplha msk-arch msk(kafka)
msk-serverless msk-serverless-arch msk serverless(kafka)
mwaa(airflow) mwaa-arch mwaa(airflow)
neptune neptune-arch sagemaker, neptune
neptune-serverless neptune-serverless-arch sagemaker, neptune serverless
neptune-analytics neptune-analytics-arch sagemaker, neptune-analytics
rds/aurora_mysql aurora_mysql aurora mysql, secrets manager
rds/aurora_postgresql aurora_postgresql aurora postgresql, secrets manager
rds/mariadb mariadb-arch mariadb, secrets manager
rds/rds_proxy-aurora_mysql rds_proxy-aurora_mysql rds-proxy, aurora mysql, secrets manager
rds/nginx-rds_proxy-aurora_mysql nginx-rds_proxy-aurora_mysql NGINX, aurora mysql, secrets manager
rds/sagemaker-aurora_mysql sagemaker-aurora_mysql aurora mysql, secrets manager, sagemaker notebook
rds/sagemaker-aurora_postgresql sagemaker-aurora_postgresql aurora postgresql, secrets manager, sagemaker notebook
rds/sagemaker-studio-aurora_postgresql sagemaker-studio-aurora_postgresql aurora postgresql, secrets manager, sagemaker studio in vpc
aurora_serverless_v1/aurora_mysql-serverless_v1 aurora_mysql_serverless_v1 aurora mysql serverless v1 cluster, secrets manager
aurora_serverless_v2/aurora_mysql-serverless_v2-replica aurora_serverless_v2_replica aurora mysql serverless v2, aurora mysql, secrets manager
aurora_serverless_v2/aurora_postgresql-serverless_v2 aurora_postgresql_serverless_v2 aurora postgresql serverless v2 cluster, secrets manager
redshift/cfn redshift-cfn-arch redshift
redshift/alpha redshift-cfn-arch redshift
redshift-serverless redshift-serverless-arch redshift-serverless
redshift-streaming-ingestion/from-kinesis redshift_streaming_from_kds redshift streaming ingestion from kinesis
redshift-streaming-ingestion/from-msk redshift_streaming_from_msk redshift streaming ingestion from msk
redshift-streaming-ingestion/from-msk-serverless redshift_streaming_from_msk_serverless redshift streaming ingestion from msk serverless
sagemaker/notebook Launch an Amazon SageMaker Notebook Instance sagemaker notebook instance
sagemaker/studio studio-vpc-internet sagemaker studio
sagemaker/studio-in-vpc studio-vpc-private 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 studio-glue-arch sagemaker studio, aws glue
sagemaker/mlflow-ec2-sagemaker mlflow-sagemaker-arch MLflow, sagemaker studio
sagemaker/mlflow-ecs-sagemaker mlflow-ecs-sagemaker-arch 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!

Useful commands

How to fetch specific source directories

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

:information_source: For more information about git sparse-checkout, see this article.

References