{"id":1520,"date":"2026-01-26T08:11:26","date_gmt":"2026-01-26T00:11:26","guid":{"rendered":"https:\/\/192.168.1.3\/wordpress\/?p=1520"},"modified":"2026-01-26T08:11:27","modified_gmt":"2026-01-26T00:11:27","slug":"aws-certified-devops-engineer-professional-dop-c02-review-material-cdk","status":"publish","type":"post","link":"https:\/\/mylinuxsite.com\/wordpress\/?p=1520","title":{"rendered":"AWS Certified DevOps Engineer Professional (DOP-C02) Review Material &#8211; CDK"},"content":{"rendered":"\n<!--more-->\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Overview<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>AWS Cloud Development Kit (AWS CDK) &#8211; an open-source software development framework for defining cloud infrastructure in code and provisioning it through AWS CloudFormation<\/li><li>Consists of two(2) parts:<ol><li>CDK Construct Library<ul><li>A collection of pre-written modular and reusable pieces of code, called constructs, that you can use, modify, and integrate to develop your infrastructure quickly.\u00a0<\/li><\/ul><\/li><li>CDK CLI<ul><li>A command-line tool for interacting with CDK apps<\/li><\/ul><\/li><\/ol><\/li><li>Supports the following programming languages:<ul><li>TypeScript,<\/li><li>JavaScript<\/li><li>Python<\/li><li>Java<\/li><li>C#\/.Net<\/li><li>Go<\/li><\/ul><\/li><li>Difference between Cfn and CDK<ul><li>Cfn defines infrastructure declaratively<\/li><li>CDK defines infrastructure imperatively<\/li><\/ul><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/docs.aws.amazon.com\/images\/cdk\/v2\/guide\/images\/AppStacks.png\" alt=\"\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Core Concepts<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Projects<\/strong>:<ul><li>Represents the files and folders that contain your CDK code.<\/li><li>Vary based on your programming language.<\/li><li>Universal Files and Folders:<ul><li><strong>.git<\/strong><\/li><li><strong>.gitignore<\/strong><\/li><li><strong>README.md<\/strong><\/li><li><strong>cdk.json<\/strong> &#8211; Configuration file for the AWS CDK. This file provides instructions to the AWS CDK CLI regarding how to run your app.<\/li><\/ul><\/li><\/ul><\/li><li><strong>Apps:<\/strong><ul><li>A collection of one or more CDK\u00a0stacks.<\/li><li>You create an app by defining an app instance in the application file of your project.<\/li><li>Stack\u00a0&#8216;constructs&#8217; are defined within the scope of an\u00a0App\u00a0construct.<\/li><li>Stacks within a single app can easily refer to each other&#8217;s resources and properties.<\/li><li>The overall grouping of your stacks and constructs is known as your CDK <strong>App<\/strong><\/li><\/ul><\/li><li><strong>Stacks:<\/strong><ul><li>The smallest single unit of deployment<\/li><li>It represents a collection of AWS resources that you define using CDK constructs.<\/li><li>When you deploy CDK apps, the resources within a CDK stack are deployed together as an AWS CloudFormation stack.<\/li><li>You define a stack by extending or inheriting from the\u00a0<strong>Stack<\/strong>\u00a0construct.<\/li><li><strong>Stack<\/strong> constructs are defined within the scope of an\u00a0<strong>App<\/strong> construct<\/li><li><strong>Stacks<\/strong> are deployed as an AWS CloudFormation stack<\/li><li>When you run the\u00a0<code>'cdk synth'<\/code>\u00a0command for an app with multiple stacks, the cloud assembly includes a separate template for each stack instance.<\/li><\/ul><\/li><li><strong>Stages:<\/strong><ul><li>Represents a group of one or more CDK stacks that are configured to deploy together.<\/li><li>\u00a0Use stages to deploy the same grouping of stacks to multiple environments, such as development, testing, and production.<\/li><\/ul><\/li><li><strong>Constructs:<\/strong><ul><li>The basic building blocks of AWS Cloud Development Kit (AWS CDK) applications. <\/li><li>A construct is a component within your application that represents one or more AWS CloudFormation resources and their configuration.<\/li><li>Constructs are classes that you import into your CDK applications from the <a href=\"https:\/\/docs.aws.amazon.com\/cdk\/v2\/guide\/libraries.html#libraries-construct\">AWS Construct Library<\/a><\/li><li>Construct Levels:<ul><li><strong>Level 1 (L1)<\/strong>:<ul><li>Also known as\u00a0<em>CFN resources<\/em>.<\/li><li>The lowest-level construct offers <em>no abstraction<\/em>. <\/li><li>Each L1 construct maps directly to a single AWS CloudFormation resource.\u00a0<\/li><\/ul><\/li><li><strong>Level 2 (L2):<\/strong><ul><li>Also known as\u00a0<em>curated<\/em>\u00a0constructs.<\/li><li>Developed by the CDK team and are usually the most widely used construct type.<\/li><li>Maps directly to single AWS CloudFormation resources but with higher abstraction.<\/li><\/ul><\/li><li><strong>Level 3 (L3):<\/strong><ul><li>Also known as\u00a0<em>pattern<\/em>s.<\/li><li>The highest level of abstraction.<\/li><li>Contains a collection of resources that are configured to work together to accomplish a specific task or service within your application. <\/li><li>Used to create entire AWS architectures for particular use cases in your application.<\/li><\/ul><\/li><\/ul><\/li><\/ul><\/li><li><strong>Context Values:<\/strong><ul><li>Key-value pairs that can be associated with an app, stack, or construct.<\/li><li>Supplied to your app either from a file (usually either\u00a0<code>cdk.json<\/code>\u00a0or\u00a0<code>cdk.context.json<\/code>\u00a0in your project directory) or on the command line.<\/li><li>Visible to child constructs, but not to parents or siblings<\/li><\/ul><\/li><li><strong>Feature Flags:<\/strong><\/li><li><strong>Aspects:<\/strong><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[11],"tags":[],"class_list":["post-1520","post","type-post","status-publish","format-standard","hentry","category-aws-review-notes"],"_links":{"self":[{"href":"https:\/\/mylinuxsite.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mylinuxsite.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mylinuxsite.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mylinuxsite.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mylinuxsite.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1520"}],"version-history":[{"count":14,"href":"https:\/\/mylinuxsite.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1520\/revisions"}],"predecessor-version":[{"id":1916,"href":"https:\/\/mylinuxsite.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1520\/revisions\/1916"}],"wp:attachment":[{"href":"https:\/\/mylinuxsite.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mylinuxsite.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mylinuxsite.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}