Content deleted Content added
Adding short description: "Open-source software development framework developed by Amazon Web Services" |
Hooperbloob (talk | contribs) →See also: rm dupe link in main article |
||
(10 intermediate revisions by 8 users not shown) | |||
Line 15:
}}
The '''AWS Cloud Development Kit''' ('''AWS CDK''') is an open-source<ref>{{Cite web |last=Kocher |first=Laveesh |date=2021-12-13 |title=AWS Announces The Release AWS Cloud Development kit |url=https://www.opensourceforu.com/2021/12/aws-announces-the-release-of-open-source-aws-cloud-development-kit/ |access-date=2023-03-19 |website=Open Source For You |language=en-US}}</ref> software development framework developed by [[Amazon Web Services]] (AWS) for defining and provisioning cloud infrastructure resources using familiar programming languages.<ref>{{Cite web |title=AWS Cloud Development Kit (CDK) |url=https://aws.amazon.com/cdk/ |access-date=2023-03-19 |publisher=Amazon Web Services, Inc.}}</ref>
== Overview ==
AWS CDK<ref>{{Cite web |last=Steenman |first=Danny |date=2022-07-23 |title=What is the AWS CDK? (A beginners guide) |url=https://towardsthecloud.com/aws-cdk |access-date=2023-09-23 |website=Towards the Cloud |language=en-US}}</ref> allows developers to model and provision cloud infrastructure resources using programming languages such as [[TypeScript]], [[JavaScript]], [[Python (programming language)|Python]], [[Java (programming language)|Java]], [[Go (programming language)|Go]], and [[C Sharp (programming language)|C#]].<ref>{{Cite web |title=AWS Cloud Development Kit (CDK) FAQs |url=https://aws.amazon.com/cdk/faqs/ |access-date=2023-03-19 |publisher=Amazon Web Services, Inc.}}</ref><ref>{{Cite news |last=Ramel |first=David |orig-date=12 March 2019 |title=AWS Adds .NET, Java Support in Cloud Development Kit |url=https://awsinsider.net/articles/2019/12/03/cdk-net-java.aspx}}</ref>
AWS CDK includes a library of constructs,<ref>{{Cite web |date=2022-03-10 |title=An Introduction To AWS Cloud Development Kit (CDK) |url=https://www.smashingmagazine.com/2022/03/introduction-aws-cloud-development-kit/ |access-date=2023-03-19 |website=Smashing Magazine |language=en}}</ref> which are pre-built components that encapsulate one or more AWS resources and their configurations.<ref>{{Cite web |title=Working with Constructs |url=https://docs.aws.amazon.com/cdk/latest/guide/constructs.html |access-date=2023-03-19 |publisher=Amazon Web Services, Inc.}}</ref>
== Key features ==
* '''Familiar programming languages''': AWS CDK supports TypeScript, JavaScript, Python, Java, Go, and C#, allowing developers to use their preferred programming languages for defining cloud infrastructure.
* '''Reusable constructs''': AWS CDK includes a library of constructs that encapsulate AWS resources, their configurations, and best practices, promoting reusability and reducing boilerplate code.
* '''Higher-level abstractions''': Developers can use constructs<ref>{{Cite web |last=Steenman |first=Danny |date=2022-05-03 |title=How to create an AWS CDK Construct |url=https://towardsthecloud.com/aws-cdk-construct |access-date=2023-09-23 |website=Towards the Cloud |language=en-US}}</ref> to create custom, higher-level abstractions, known as patterns, to simplify complex infrastructure patterns and improve maintainability.
* '''Integration with AWS CloudFormation''': AWS CDK applications are compiled into AWS CloudFormation templates, ensuring compatibility with existing AWS CloudFormation features and tools.<ref>{{Cite web |title=AWS Cloud Development Kit (CDK) FAQs |url=https://aws.amazon.com/cdk/faqs/ |access-date=2023-03-19 |publisher=Amazon Web Services, Inc.}}</ref>
* '''Modularity and extensibility''': AWS CDK promotes modularity and extensibility by allowing developers to create and share custom constructs and patterns.
Line 33:
* '''2018:''' AWS CDK was announced as a developer preview at the AWS Summit in New York on July 17, 2018, offering an early version of the framework for developers to test and provide feedback.<ref>{{Cite web |date=2018-08-27 |title=AWS CDK Developer Preview {{!}} AWS Developer Tools Blog |url=https://aws.amazon.com/blogs/developer/aws-cdk-developer-preview/ |access-date=2023-03-19 |website=aws.amazon.com |language=en-US}}</ref>
* '''2019:''' AWS CDK reached general availability (GA) on July 11, 2019, with support for TypeScript and Python as the initial programming languages.<ref>{{Cite web |author=Werner Vogels |date=2019-07-11 |title=AWS Cloud Development Kit (CDK) – TypeScript and Python are Now Generally Available |url=https://aws.amazon.com/blogs/aws/aws-cloud-development-kit-cdk-typescript-and-python-are-now-generally-available/ |access-date=2023-03-19 |publisher=Amazon Web Services, Inc.}}</ref>
* '''2019:''' Support for Java and C# was added to AWS CDK on November 25, 2019, broadening the range of programming languages available for defining and provisioning cloud infrastructure resources.<ref>{{Cite web |date=2019-11-25 |title=AWS Cloud Development Kit (CDK) – Java and .NET are Now Generally Available {{!}} AWS News Blog |url=https://aws.amazon.com/blogs/aws/aws-cloud-development-kit-cdk-java-and-net-are-now-generally-available/ |access-date=2023-03-19 |website=aws.amazon.com |language=en-US}}</ref>
* '''2021:''' AWS CDK v2 is released and consolidates the AWS Construct Library into a single package called aws-cdk-lib, streamlining usage and updates, ensuring stable APIs, and offering developer productivity improvements such as CDK Watch, a refreshed API Reference, and a new assertions library for automated unit testing in all CDK-supported languages.<ref>{{Cite web |title=AWS Cloud Development Kit (AWS CDK) v2 is now generally available |url=https://aws.amazon.com/about-aws/whats-new/2021/12/aws-cloud-development-kit-cdk-generally-available/ |access-date=2023-03-19 |website=Amazon Web Services, Inc. |language=en-US}}</ref>
== Launching CDK ==
To get started with AWS CDK, developers need to install the AWS CDK Toolkit, which provides a command-line interface (CLI) for creating and managing AWS CDK projects.<ref>{{Cite web |title=AWS CDK Toolkit |url=https://docs.aws.amazon.com/cdk/latest/guide/tools.html |access-date=2023-03-19 |publisher=Amazon Web Services, Inc.}}</ref>
== Example code ==
The following is AWS CDK code written in TypeScript that creates an Amazon S3 bucket with public read access. This code imports the necessary AWS CDK libraries to create a new CloudFormation stack with a single Amazon S3 bucket resource. The Bucket constructor is used to create the bucket with the specified properties, including encryption, block public access, public read access, and versioning. The
<syntaxhighlight lang="typescript">
import { Construct, Stack, StackProps } from 'aws-cdk-lib';
import { Bucket } from 'aws-cdk-lib/aws-s3';
Line 62:
}
}
</syntaxhighlight>
== See also ==
* [[Terraform (software)|Terraform]]
* [[Infrastructure as Code]]
Line 84 ⟶ 82:
[[Category:Amazon Web Services]]
[[Category:Software using the Apache license]]
|