We use analytics and advertising cookies to understand how the site is used and whether our ads on Facebook and Instagram work. They are set only if you accept. See our Privacy Policy for details.
AWS CDK interviews test whether you understand what the CDK does underneath: it synthesizes CloudFormation, so deployment, rollback and drift are CloudFormation's behaviour, while constructs, grants and environments are the CDK's. Expect questions on construct levels, bootstrap, cross-stack and cross-region references, context lookups and how you test a stack.
Each question below is a scenario with four plausible answers and an explanation.
Answer a real AWS interview question before you browse the CDK list. No signup needed.
A content management application runs on EC2 instances in an Auto Scaling group across three Availability Zones. Every instance must read and write the same set of user-uploaded files through a standard file system interface (POSIX), and files must remain available if an AZ fails. Which storage solution should a solutions architect choose?
Practice in a session
10 questions from AWS, one after another, then your score and streak.
Construct levels (L1, L2, L3), what `cdk synth` produces (CloudFormation templates and assets in a cloud assembly), bootstrapping, stacks, stages and environments, cross-stack references and their limits, context values and lookups, aspects, the grant methods for IAM, unit tests with the assertions module, and CDK Pipelines.
L1 constructs (the Cfn* classes) map one-to-one to CloudFormation resource types. L2 constructs are curated wrappers with sensible defaults and helper methods such as grant* and metric*. L3 constructs, or patterns, compose several resources into one unit, for example a load-balanced Fargate service.
It deploys the CDKToolkit stack into an account and region: an S3 bucket and an ECR repository for file and image assets, plus the IAM roles the CDK CLI assumes to publish assets and run deployments. A stack that needs assets cannot deploy to an environment that has not been bootstrapped.
CDK gives you a general-purpose language, loops and reusable constructs, and still deploys through CloudFormation's change sets and rollback. Plain CloudFormation is the reviewable template with no build step. Terraform keeps its own state and covers many providers beyond AWS. Interviewers want the trade-off reasoning, not a favourite.