This repository contains working all the code examples related to the https://blog.infra.kiwi publication.
- 0001-cdk-force-tagging: This example shows how to create a custom synthesizer, to forcefully populate the tags of the deployed stacks and relative resources.
- 0002-cdk-lambda-auth-api-gw: This example shows how to leverage IAM-authorized routes for API Gateways to allow external clients to make IAM-authorized requests.
- 0003-naming-id-practices: This example shows how to define good, self-explaining AWS CDK construct IDs.
- 0004-cloudfront-logs-glue-athena: This example shows how to query CloudFront logs using AWS Athena and AWS Glue.
- 0005-cdk-nag: This example shows how to apply the CDK linting rules provided by
cdk-nag
. - 0006-cdk-lazy: This example shows you how to use the CDK
Lazy
function to generate a "static" value (such as text) using a dynamic approach. - 0007-cdk-cross-stack-references: This example shows multiple ways of using values generated by a stack, such as resources' ARNs, in another stack.
- 0008-cdk-aws-chatbot: This example shows how to configure the AWS ChatBot to send messages to Slack by creating a notification pipeline that accepts a custom message payload format.
- 0009-cdk-lambda-error-catcher: This example shows you how you can catch Lambda function error messages and (optionally) post them to a Slack channel.
- 0010-cdk-shared-items: This example shows how to use the "shared items" concept to share an EventBus among multiple stacks, without having to explicitly pass around the dependency.
- 0011-cdk-tagging-aspects: This example shows some use cases of the AWS CDK Aspects feature.
- 0012-cdk-lambda-github: This example shows how to set up a Lambda function that listens to GitHub webhooks and answers back.
- 0013-jsii-js-to-go: This example shows how to use JSII to generate Go-compatible code from a TypeScript codebase.
- 0014-zx-scripting-in-typescript: This folder contains an example on how to set up a TypeScript repository to execute
zx
scripts.
All the CDK examples are based on a progressively-built boilerplate-cdk folder, which contains the skeleton for new examples.
To create a new CDK project, run:
.\hack\new-project.ps1 0001-cdk-mah-project