my-aws-cdk-examples icon indicating copy to clipboard operation
my-aws-cdk-examples copied to clipboard

A collection of AWS CDK Python examples with architecture diagrams for frequently used AWS services

AWS CDK Python Examples

Python

This repository contains a set of example projects for the AWS Cloud Development Kit

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/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
athena athena-arch athena (named query, work group), s3
batch/batch-with-ec2 Launch AWS Batch aws batch
cloudfront/static-site cloudfront-s3-static-site-arch cloudfront
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
documentdb documentdb-sagemaker-arch secerts manager, sagemaker, documentdb
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
elasticache/redis elasticache-redis-arch redis, redis-cluster
elasticsearch amazon-es-arch elasticsearch
opensearch/cfn-domain amazon-es-arch opensearch created with cdk.aws_opensearch.CfnDomain construct
opensearch/domain amazon-es-arch opensearch created with cdk.aws_opensearch.Domain construct
emr Launch an Amazon EMR cluster emr, Hive, Spark, JupyterHub, Hudi, Iceberg
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
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-streams/to-kinesis-data-firehose amazon-ekk-stack-arch kinesis data streams, kinesis firehose, s3
lambda/async-invoke aws-lambda-async-invocation lambda, sns, event-bridge
memorydb-for-redis memorydb-for-redis memorydb
msk msk-arch msk(kafka)
mwaa(airflow) mwaa-arch mwaa(airflow)
neptune neptune-arch sagemaker, neptune
rds/aurora_mysql aurora_mysql aurora mysql, secrets manager
rds/aurora_postgresql aurora_postgresql aurora postgresql, secrets manager
rds/rds_proxy-aurora_mysql rds_proxy-aurora_mysql rds-proxy, aurora mysql, secrets manager
rds/sagemaker-aurora_mysql sagemaker-aurora_mysql rds-proxy, aurora mysql, secrets manager, sagemaker
sagemaker/notebook Launch an Amazon SageMaker Notebook Instance sagemaker notebook instance
sagemaker/studio Launch an Amazon SageMaker Studio sagemaker studio

Enjoy!

Useful commands

  • npm install -g aws-cdk Install the AWS CDK Toolkit (the cdk command).
  • npm install -g aws-cdk@latest Install the latest AWS CDK Toolkit (the cdkcommand).
  • 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

References