Skip to content
David Liu edited this page Jun 6, 2024 · 3 revisions

Because of the challenges of writing raw YAML/JSON by hand, two notable projects (as Cloud Template Transpiler) exist to compile higher-level languages into AWS CloudFormation YAML/JSON templates:

Troposphere

a community-led open source project created in 2013;

AWS Cloud Development Kit (CDK)

CDK is a transpiler (i.e., a source-to-source compiler) that first produces AWS Cloud Assembly, an intermediate format consisting of CloudFormation templates and other assets. After the transpilation process, these assets are uploaded to targeted services (such as S3, ECR) and then the CDK invokes the CloudFormation service, which begins the deployment process.

  • an AWS Labs project created in 2018.

Constructs

API lib & doc

  • Constructs are the basic building blocks of AWS CDK apps. 基本单元
  • A construct represents a “cloud component” and encapsulates everything AWS CloudFormation needs to create the component.
  • 在 AWS CDK 的世界,所有東西都是 Construct

App

  • A special type of Construct. The App construct doesn’t require any initialization arguments
  • It’s the only construct that can be used as a root for the construct tree.
  • The unit of deployment in the AWS CDK is called a stack.
  • All AWS resources defined within the scope of a stack, either directly or indirectly, are provisioned as a single unit.

Limits

speed (of both the inner development loop and the actual deployment)

correctness

  • errors may not be discovered until hours into the deployment process, rather than at compile time.
  • Because of the inherent CDK dependencies, users need expertise in both CloudFormation and the CDK in order to debug any issues and achieve any successful results.

Refs

Clone this wiki locally