Setting Up Our Development Environment for the AWS CDK for Node.js - krdheeraj51/aws-labs GitHub Wiki
Let's walk through setting up the AWS CDK environment on your machine. Follow these steps for a smooth configuration:
Installing AWS CLI and Configuring it on Windows
-
Install AWS CLI:
- Download the AWS CLI MSI installer for Windows.
- Run the downloaded installer.
-
Verify the Installation:
- Open a new Command Prompt or PowerShell window.
- Run the following command:
aws --version
-
Configure AWS CLI:
- Run the following command:
aws configure
- Provide the requested information:
- AWS Access Key ID: Your AWS access key.
- AWS Secret Access Key: Your AWS secret key.
- Default region name: The AWS region you want to use (e.g.,
us-east-1
). - Default output format: The preferred output format (e.g.,
json
).
Checking the Installation of Node.js and npm
-
Open a Terminal or Command Prompt:
- Windows: Open Command Prompt or PowerShell.
- macOS/Linux: Use the Terminal.
-
Check Node.js Version:
node -v
-
Check npm Version:
npm -v
Note: If Node.js isn't already installed, download and install it from https://nodejs.org/ before proceeding. Node.js and npm are prerequisites for the AWS CDK.
Installing the AWS CDK Package
-
Open a Terminal or Command Prompt.
-
Install the AWS CDK package using npm:
npm install -g aws-cdk # The -g flag installs it globally
(Or, if you prefer yarn:
yarn global add aws-cdk
) -
Verify the Installation:
cdk --version
This command should print the installed version of the CDK.
Next Steps
After completing these steps, you're ready to create your first CDK application!