Module 1: Understand CDK Requirements
Understand CDK Requirements
In this module, you will learn about prerequisites for running CDK
What you will accomplish
- Set up the AWS CLI
- Choose and install an IDE
- Ensure that you have the correct language framework ready
To use CDK, you need to have a few prerequisites installed and configured. We will not be diving into the details of these in this tutorial, but reference existing tutorials or documentation on how to accomplish the tasks.
Time to complete
- AWS account with administrator-level access**
- Recommended browser: The latest version of Chrome or Firefox
[**]Accounts created within the past 24 hours might not yet have access to the services required for this tutorial.
Install and configure AWS CLI
For AWS CDK to interact with your AWS Account, it needs credentials and the AWS CLI installed and configured. If you haven't done so, please follow the Setting Up Your AWS Environment guide to set up the CLI on your workstation. When you're setting up your AWS CLI, remember to use an AWS account with administrator-level access.
If you will be using AWS CDK on AWS Cloud9, the CLI should already be installed and configured.
Choose and install an IDE
One of the benefits of AWS CDK is that you can use your favorite development environment and have a rich experience when exploring the hundreds of different services and features of AWS. We highly recommend you use an IDE that supports code-completion and syntax highlighting for your language of choice:
- Visual Studio Code (VSCode)
- AWS Cloud9
Check your language framework
All AWS CDK developers, even those working in Python, Java, or C#, need Node.js 10.13.0 or later. All supported languages use the same backend, which runs on Node.js.
To work with the AWS CDK, you must have an AWS account and credentials and have installed Node.js and the AWS CDK Toolkit. You also need TypeScript itself (version 3.8 or later).
If you don't already have it, you can install it using npm:
npm install -g typescript
If you get a permission error, and have administrator access on your system, you can try:
sudo npm install -g typescript
For full information, see Working with the AWS CDK in TypeScript.
If you decide to use Python as your CDK language of choice, you will need to have Python installed. Specifically you will need Python 3.6 or later installed. You can find information on installing Python here.
Additionally you will need to have the Python Package Manager (pip) and virtualenv installed. See the installation instructions here. For full information, see Working with the AWS CDK in Python.
If Java is your language of choice, you will need to have the following installed:
- JDK (Java Development Kit) 8 (Java 1.8) or later
- Apache Maven 3.5 or later
You can find information about downloading and installing the Amazon Coretto 8 distribution here. Other JDK 8 distributions are available if you do not wish to use Amazon Coretto. For full information, see Working with the AWS CDK in Java.
If C# is your language of choice, you need .NET Core 3.1 or later. Visual Studio 2019 (any edition) or Visual Studio Code is recommended. For full information, see Working with the AWS CDK in C#.
You are now ready to get started with the AWS CDK. It is recommended to use AWS Cloud9 for this tutorial as all the prerequisites have been installed.