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

Commit cbca968

Browse files
AlperSakaryaferdingler
authored andcommitted
Updates to CDK install instructions
The lab code and all the import constructs are for AWS CDK V1, however Cloud9 now comes with CDK V2 and the lab does not work if someone was to copy/paste all the instructions. It requires users to troubleshoot the error. I've done a small update on the CDK install instructions where it removes the CDK V2 from the default Cloud 9 instance and installs CDK V1 where all the dependencies work perfectly. Also added a CDK alias so no additional workshop instructions needs to be updated.
1 parent 59eb02d commit cbca968

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

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

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,13 @@ date = 2019-11-01T15:26:09-07: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. Run the following commands from the Cloud9 terminal to remove your current version and install the latest one:
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-
npm uninstall -g aws-cdk
12-
npm install -g aws-cdk
11+
npm uninstall -g cdk
1312
```
1413

15-
{{% notice tip %}}
16-
If the Cloud9 terminal returns an error, use the `--force` flag: `npm install -g aws-cdk --force`
17-
{{% /notice %}}
18-
1914

2015
### Initialize project
2116

@@ -29,7 +24,16 @@ cd pipeline
2924
Initialize a new CDK project within the _pipeline_ folder by running the following command:
3025

3126
```
32-
cdk init --language typescript
27+
npx aws-cdk@1.x init app --language typescript
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+
```
36+
alias cdk="npx aws-cdk@1.x"
3337
```
3438

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

0 commit comments

Comments
 (0)