Since Re:invent 2021 was last week, this issue of the bulletin will mainly focus on a few things that were announced or released during Re:Invent.
AWS Cloud Development Kit v2 released
Version 2 of the AWS Cloud Development Kit (AWS CDK) has now been officially released, about a week ago. I have been using the release candidates for version 2.0.0 for months now, and I am happy that it has finally been released!
If you are not familiar with AWS CDK, it is a toolkit and set of libraries to define, provide, and manage cloud infrastructure (in AWS) using software engineering practices. You create the infrastructure descriptions using regular programming languages, which include Typescript, Python, Java, C#/.NET, and soon Go.
The key changes between version 1 and version 2 are organisational ones. Instead of separate packages/modules for every AWS service, which you have to install and update separately in version 1, you now in version 2 have a single package with almost everything in it. This simplifies project configuration and makes it easier to perform updates.
For version 2, the releases now follow semantic versioning, which version 1 did not do. In version 1, you could not easily see if there were any potentially breaking changes. In version 2, you at least know that the APIs in the main CDK package are stable. Unstable/experimental APIs have their own separate packages and are only incorporated into the main package after the APIs have stabilised.
You still need to read release notes to find out if an update contains new features that apply to you. But you can be more confident that your code does not break if you just use features from the main package.
Also, features that used to be controlled by feature flags in version 1 are now enabled by default in version 2, and no longer needed. APIs that were deprecated in version 1 have now been removed as well. You can still find the deprecated parts in the documentation, where there will be a reference to what you should use instead.
AWS themselves have a version 1 to version 2 migration guide, which is worth checking out. The code changes will mainly be how you import AWS CDK resources into your code - the logic itself should remain the same.
If you have not used AWS CDK, or are just starting out, I recommend going with version 2. It will be a better experience. If you are using AWS CDK version 1 right now, note that version 1 will go into maintenance mode on June 1st 2022, and will not be supported after June 1st 2023.
The latest release of AWS CDK is 2.1.0 at the time of writing.
There are a few posts on Tidy Cloud AWS that may be of interest also:
- Why infrastructure-as-code matter to you, even if you are not a hotshot developer
- Is AWS Cloud Development Kit right for you?
- How to become an infrastructure-as-code ninja, using AWS CDK
The CDK Book
In other AWS CDK news, a new book about using AWS CDK has seen the light of day!
It is simply called The CDK Book and is written by a few members of the CDK community, Sathyajith Bhat, Matthew Bonig, Matt Coulter, and Thorsten Höger.
The authors are active in the CDK community and you can find them in cdk.dev Slack, the CDK Day events, and other places. The book is available as an ebook from https://thecdkbook.com, for $39. Example code should be available in all officially supported programming languages it seems (Typescript, Python, Java, C#)
I have not checked out the book yet, but I plan to do so soon. It is a welcome addition to the material available for AWS CDK!
Construct Hub released
At the same time that AWS CDK version 2 was released, AWS also released Construct Hub. This is a website with a registry of CDK packages, from AWS as well as 3^rd^ party contributors. If you have built a construct that you want to share with the world, this might be a place to place it in.
The website is for CDK in a broader sense. It covers AWS CDK, CDK for Terraform (CDKTF) and CDK for Kubernetes (CDK8s). From AWS, it includes AWS own CDK packages, as well as wrappers around custom resources in the CloudFormation Registry.
I like the ambition to have a single point to find CDK-related resources, and that it covers all the CDKs. The construct hub website is also available as a construct, so it is at least in theory possible to set up your own website for CDK constructs, which might be useful in a corporate setting.
Sustainability pillar in Well-Architected Framework
AWS has added a sustainability pillar to the Well-Architected Framework. The Well-Architected Framework is a set of practices and guidelines to create and maintain excellent solutions in the AWS platform. Previously, the pillars of the well-architected framework included:
- Operational Excellence
- Performance Efficiency
- Cost Optimization
Now Sustainability is added to the mix as well. I think this is a significant move to include sustainability concerns as part of this framework, and it puts a light on what you as an AWS customer can do in that regard.
There is an enormous responsibility on AWS here as well, which is pointed out in the shared responsibility model for sustainability that AWS outlines in the documentation. Unfortunately, not that much at this point that allows customers to see how well AWS is doing in that regard in different regions. If a region and/or availability zone uses more renewable energy sources than another region, I would want to know that.
It is a wonderful step on the way though, and have a look at the Sustainability Pillar documentation, and think about what you do and use, and what you can apply today.
AWS is famous for shut no service down. But it seems they might actually do that in this case - the AWS Discussion Forums. The discussion forums have in theory been a place to ask questions and get answers, but in practice I would say it has been pretty much dead. The few times I went there to see if there were any useful and always saw a dead and empty environment, with no answers and only a few questions.
Now AWS tries to do something about with the launch of AWS Re:post. It is a new questions and answers area, with a new interface and a more gamified experience. It will be interesting to see how this plays out.
You can find AWS Re:post at the website URL https://repost.aws.
An immediate drawback to me was that you have to login with IAM User credentials essentially to get access to Re:post. It is clunky, and I do not see why I should need to do that. On top of this, most of my logins nowadays in AWS are through an SSO login like AWS SSO - I do not use a permanent IAM User at all! But this does not seem to be supported in Re:post.
I wish you could set up a user which is not strictly tied to an AWS Account, but that is perhaps an improvement for the future.
You can find the contents of this bulletin and older ones, and more at Tidy Cloud AWS. You will also find other useful articles around AWS automation and infrastructure-as-software.
Until next time,