Ravi Sir's Cards › AWS
Constructs L1 / L2 / L3
This revision card explains Constructs L1 / L2 / L3. It starts from the need that using only raw CloudFormation properties in CDK loses the safety of higher constructs. It describes L1 = CFN resources (Cfn*). L2 = opinionated helpers (Bucket, Function). L3 = patterns (whole apps). The how-to section notes prefer L2 Bucket/Function for labs; drop to L1 only for new flags L2 lacks. An example on the card is new lambda.Function(.) sets runtime and code without hand-writing every CFN key.
Read card text
What this card says
Why do we need it?
Using only raw CloudFormation properties in CDK loses the safety of higher constructs.
What is it?
L1 = CFN resources (Cfn*). L2 = opinionated helpers (Bucket, Function). L3 = patterns (whole apps).
L2 Function
How to do it
Prefer L2 Bucket/Function for labs; drop to L1 only for new flags L2 lacks.
Example
new lambda.Function(...) sets runtime and code without hand-writing every CFN key.