Recently, AWS announced the general availability (GA) of version 2.0 of the AWS Cloud Development Kit (AWS CDK) and AWS Construct Hub during its annual re:Invent conference. The AWS CDK is an extensible open-source software development framework allowing developers to model and provision their cloud infrastructure using familiar programming languages – while AWS Construct Hub provides an online registry where open-source community, AWS, and cloud technology providers can discover and share construct libraries for all CDKs.
With the new releases generally available, the company claims that defining cloud resources using the CDK is now even more convenient and straightforward - and the Construct Hub enables sharing of open-source construct libraries into the broader cloud development community.
The first version of AWS CDK was released to GA in July 2019, following a developer preview of the CDK to get developers on board and help drive the framework’s evolution. Now version 2 of the AWS CDK focuses on productivity improvements for developers working with CDK projects by consolidating individual packages (libraries) into a single monolithic package simplifying dependency management. Furthermore, referencing constructs from multiple services in CDK projects becomes more convenient.
In a news blog post the GA of AWS CDK and Construct Hub, Steve Roberts, a developer advocate focused on .NET and PowerShell development on AWS, stated:
From version 2 onwards, the monolithic CDK package will contain only stable APIs that customers can always rely on. Experimental APIs will be shipped in separate packages, making it easier for the team and community to revise them and ensure customers don’t incur the accidental breaking changes that caused some issues in version 1.
Next, Construct Hub offers over 700 CDK libraries, including core AWS CDK modules, to help customers build their cloud applications using their preferred programming languages, their preferred use case, and their preferred provisioning engine (CloudFormation Terraform, or Kubernetes). Furthermore, anyone can contribute construct libraries to the Construct Hub. In an AWS Open Source blog post on AWS Construct Hub, Alex Pulver, a senior partner solutions architect at AWS SaaS Factory team, explains the concept of constructs:
Constructs are object-oriented classes which define a "piece of desired state". Constructs can be composed together to form higher-level building blocks which represent more complex desired state. AWS, enterprises, start-ups, and individual developers use CDK constructs to share proven architecture patterns as reusable code libraries, so that everyone can benefit from the collective wisdom of the community.
Lastly, more details on version 2.0 of AWS CDK are available in the documentation and guidance for the AWS Construct Hub in the best practices blog post.