To use the AWS Cloud Development Kit (CDK), you'll need to set up a few things on your development environment.
Here's a general guide on what you need:
Step |
Command |
Explanation |
AWS CLI |
sudo apt-get install awscli |
Installs the AWS Command Line Interface (CLI) on your Ubuntu system, allowing you to interact with AWS services from the command line. |
aws configure |
Configures the AWS CLI by prompting you for your AWS Access Key ID, Secret Access Key, region, and output format. |
NVM |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash |
Downloads and installs NVM (Node Version Manager), which allows you to manage multiple versions of Node.js on your system. |
source ~/.nvm/nvm.sh |
Loads NVM into the current terminal session, making the nvm command available immediately after installation. |
nvm --version |
Verifies that NVM is installed correctly by checking its version. |
Node.js and npm |
nvm install v20.11.0 |
Installs Node.js version 20.11.0, along with npm (Node Package Manager), using NVM. |
node --version |
Checks and confirms the installed version of Node.js. |
npm --version |
Checks and confirms the installed version of npm. |
AWS CDK |
npm install -g aws-cdk |
Installs the AWS CDK (Cloud Development Kit) CLI globally on your system, enabling you to create and manage AWS infrastructure using code. |
npm install aws-cdk-lib |
Installs the AWS CDK library in the current project directory, which provides the constructs and resources needed to define your infrastructure. |
cdk --version |
Verifies that the AWS CDK CLI is installed correctly by checking its version. |
Docker |
Installation guide |
Provides a link to the official Docker installation guide for Ubuntu, which you should follow to install Docker on your system. |
sudo chmod 666 /var/run/docker.sock |
Changes the permissions on the Docker socket, allowing your user to run Docker commands without needing sudo . |