Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cards › AWS

How do you test CDK?

This interview card answers: How do you test CDK? Use assertions on the synthesized template (fine-grained + snapshot) in unit tests. Fail CI if a public S3 bucket appears in the template. Expect(stack).toHaveResource("AWS::S3::Bucket", { PublicAccessBlockConfiguration:. }).

How do you test CDK? Use assertions on the synthesized template (fine-grained + snapshot) in unit tests. Fail CI if a public S3 bucket appears in the template. expect(stack).toHaveResource(
How do you test CDK? · Download PNG
Read card text

What this card says

What it is

Use assertions on the synthesized template (fine-grained + snapshot) in unit tests.

Template.fromStack

Why it matters

Fail CI if a public S3 bucket appears in the template.

How / example

expect(stack).toHaveResource("AWS::S3::Bucket", { PublicAccessBlockConfiguration: ... }).

See all AWS revision cards