Skip to content
This repository was archived by the owner on Nov 4, 2022. It is now read-only.

Commit dc04dca

Browse files
hakansonferdingler
authored andcommitted
Updates to CDK install instructions
1 parent cbca968 commit dc04dca

File tree

2 files changed

+26
-15
lines changed

2 files changed

+26
-15
lines changed

workshop/content/csharp/buildpipe/cdkinit/_index.en.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@ date = 2021-08-30T08:30:00-06:00
44
weight = 21
55
+++
66

7-
## Install the latest CDK
7+
## Install the CDK V1
88

9-
If you are using Cloud9, the CDK is already pre-installed but it will likely be a few versions old. Likewise, the Node.js runtime is outdated.
9+
If you are using Cloud9, the CDK is already pre-installed but it will likely be a the CDK V2. Where this workshop was published for AWS CDK V1. Run the following commands from the Cloud9 terminal to remove your current version we will initialize the pipeline with V1 in a bit:
1010

11-
Run the following commands from the Cloud9 terminal to update Node.js and and install the latest AWS CDK:
1211
```bash
13-
brew install node@14
14-
echo 'export PATH="/home/linuxbrew/.linuxbrew/opt/node@14/bin:$PATH"' >> /home/ec2-user/.bash_profile
15-
. ~/.bash_profile
16-
npm install -g aws-cdk
12+
npm uninstall -g cdk
1713
```
1814

1915
### Initialize project
@@ -28,7 +24,16 @@ cd pipeline
2824
Initialize a new CDK project within the _pipeline_ folder by running the following command:
2925

3026
```bash
31-
cdk init --language csharp
27+
npx aws-cdk@1.x init app --language csharp
28+
```
29+
30+
{{% notice tip %}}
31+
You will be prompted to install ```aws-cdk@1.x```, go ahead and accept with ```y```.
32+
{{% /notice %}}
33+
34+
Now add an alias as ```cdk``` for AWS CDK V1:
35+
```bash
36+
alias cdk="npx aws-cdk@1.x"
3237
```
3338

3439
Now install the CDK modules that we will be using to build a pipeline:

workshop/content/python/buildpipe/cdkinit/_index.en.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ date = 2021-08-30T08:30:00-06:00
44
weight = 21
55
+++
66

7-
## Install the latest CDK
7+
## Install the CDK V1
88

9-
If you are using Cloud9, the CDK is already pre-installed but it will likely be a few versions old. Likewise, the Node.js runtime is outdated.
9+
If you are using Cloud9, the CDK is already pre-installed but it will likely be a the CDK V2. Where this workshop was published for AWS CDK V1. Run the following commands from the Cloud9 terminal to remove your current version we will initialize the pipeline with V1 in a bit:
1010

11-
Run the following commands from the Cloud9 terminal to update Node.js and and install the latest AWS CDK:
1211
```bash
13-
nvm install lts/fermium
14-
nvm alias default lts/fermium
15-
npm install -g aws-cdk
12+
npm uninstall -g cdk
1613
```
1714

1815
### Initialize project
@@ -27,7 +24,16 @@ cd pipeline
2724
Initialize a new CDK project within the _pipeline_ folder by running the following command:
2825

2926
```bash
30-
cdk init --language python
27+
npx aws-cdk@1.x init app --language python
28+
```
29+
30+
{{% notice tip %}}
31+
You will be prompted to install ```aws-cdk@1.x```, go ahead and accept with ```y```.
32+
{{% /notice %}}
33+
34+
Now add an alias as ```cdk``` for AWS CDK V1:
35+
```bash
36+
alias cdk="npx aws-cdk@1.x"
3137
```
3238

3339
Now install the CDK modules that we will be using to build a pipeline:

0 commit comments

Comments
 (0)