Skip to content

Commit 6960bf7

Browse files
authored
Move LHOL and LEDA to Cloud9. Update whole lab to use same C9 (#95)
* YOLO * LEDA with proper C9 template * Further work on C9 for DynamoDB ID * LADV broad changes to remove EE and add C9/WS * Tying together C9 across labs * LEDA updated too
1 parent 5d4d5a1 commit 6960bf7

File tree

37 files changed

+990
-314
lines changed

37 files changed

+990
-314
lines changed

.github/scripts/build-assets.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
#Move static assets
2323
Path(dest_root, 'assets').mkdir(parents=True, exist_ok=False)
2424
data_files = ['design-patterns/cloudformation/lab.yaml',
25+
'design-patterns/cloudformation/C9.yaml',
2526
'design-patterns/cloudformation/UserData.sh',
27+
'design-patterns/cloudformation/UserDataC9.sh',
2628
'event-driven/event-driven-cfn.yaml',
2729
'static/files/hands-on-labs/migration-env-setup.yaml',
2830
'static/files/hands-on-labs/migration-dms-setup.yaml']

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
run: aws s3 sync public s3://$STEP_S3_BUCKET --delete
4747
- name: SetS3Acl
4848
run: aws s3api put-object-acl --grant-read uri=http://acs.amazonaws.com/groups/global/AllUsers --bucket $STEP_S3_BUCKET --key assets/lab.yaml
49+
- name: SetS3Acl
50+
run: aws s3api put-object-acl --grant-read uri=http://acs.amazonaws.com/groups/global/AllUsers --bucket $STEP_S3_BUCKET --key assets/C9.yaml
4951
- name: SetS3AclED1
5052
run: aws s3api put-object-acl --grant-read uri=http://acs.amazonaws.com/groups/global/AllUsers --bucket $STEP_S3_BUCKET --key assets/GeneratorLambdaPackage.zip
5153
- name: SetS3AclED2

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ pygmentsStyle = "monokai"
2929
disableShortcutsTitle = true
3030
disableInlineCopyToClipBoard = true
3131
#AWS custom params
32-
design_patterns_s3_lab_yaml = "https://s3.amazonaws.com/amazon-dynamodb-labs.com/assets/lab.yaml"
32+
design_patterns_s3_lab_yaml = "https://s3.amazonaws.com/amazon-dynamodb-labs.com/assets/C9.yaml"
3333
lhol_migration_setup_yaml = "https://s3.amazonaws.com/amazon-dynamodb-labs.com/assets/migration-env-setup.yaml"
3434
lhol_migration_dms_setup_yaml = "https://s3.amazonaws.com/amazon-dynamodb-labs.com/assets/migration-dms-setup.yaml"
3535
event_driven_architecture_lab_yaml = "https://s3.amazonaws.com/amazon-dynamodb-labs.com/assets/event-driven-cfn.yaml"

content/design-patterns/_index.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title = "Advanced Design Patterns for Amazon DynamoDB"
33
chapter = true
44
description = "300 level: Hands-on exercise using Python and DynamoDB best practices."
5-
pre = "<b>Workshop: </b>"
5+
pre = "<b>LADV: </b>"
66

77
weight = 1
88
+++

content/design-patterns/ex1capacity/Step2.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ weight = 3
77

88
Now that you have created the table, you can load some sample data into the table by running the following Python script.
99
```bash
10-
cd /home/ec2-user/workshop
10+
cd /home/ubuntu/workshop
1111
python load_logfile.py logfile ./data/logfile_small1.csv
1212
```
1313
The parameters in the preceding command: 1) Table name = `logfile` 2) File name = `logfile_small1.csv`

content/design-patterns/ex8streams/Step6.en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ NEXTTOKEN eyJFeGNsdXNpdmVTdGFydEtleSI6IG51bGwsICJib3RvX3RydW5jYXRlX2Ftb3Vu
5555

5656
## Congratulations, you have successfully completed all the exercises in the workshop!
5757

58-
If you ran the lab on your own AWS account, you should delete all the tables made during these exercises. If you are at an AWS event using the AWS Workshop platform (the Event Engine), you do not need to delete your tables.
58+
If you ran the lab on your own AWS account, you should delete all the tables made during these exercises. If you are at an AWS event using the AWS Workshop platform (Workshop Studio), you do not need to delete your tables.
5959

6060
{{% notice warning %}}
61-
During the course of the lab, you created DynamoDB tables that will incur a cost that could approach tens or hundreds of dollars per day. You must delete the DynamoDB tables using the DynamoDB console to clean up the lab. In addition, if you are not part of an AWS event or you are running this lab in your own account, make sure you delete the CloudFormation stack as soon as the lab is complete. If you're using event engine, you don't need to delete the CloudFormation stack.
61+
During the course of the lab, you created DynamoDB tables that will incur a cost that could approach tens or hundreds of dollars per day. You must delete the DynamoDB tables using the DynamoDB console to clean up the lab. In addition, if you are not part of an AWS event or you are running this lab in your own account, make sure you delete the CloudFormation stack as soon as the lab is complete. If you're using Workshop Studio Event Delivery, you don't need to delete the CloudFormation stack.
6262
{{% /notice %}}
6363

6464
#### Reporting issues

content/design-patterns/setup/Step1.en.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,32 @@ weight = 10
55
#TODO mod-xxx is not the same name when running in EC2
66
+++
77

8-
1. Once you've gained access to the AWS Management Console for the lab, double check the region is correct and one of **TeamRole** OR **WSParticipantRole** appears on the top right of the console.
8+
1. Once you've gained access to the AWS Management Console for the lab, double check the region is correct and the role name **WSParticipantRole** appears on the top right of the console.
99
1. In the services search bar, search for **Systems Manager** and click on it to open the AWS Systems Manager section of the AWS Management Console.
1010
1. In the AWS Systems Manager console, locate the menu in the left, identify the section **Node Management** and select **Session Manager** from the list.
1111
1. Choose **Start session** to launch a shell session.
12-
1. Click the radio button to select the EC2 instance for the lab. If you see no instance, wait a few minutes and then click refresh. Wait until an ec2 instance with name of `mod-XXXXXXXXXXXXXXXX` OR `ddb` is available before continuing. You will see only one of the two names.
13-
1. Click in the **Start Session** button (This action will open a new tab in your browser with a new black shell).
14-
1. In the new black shell, switch to the ec2-user account by running `sudo su - ec2-user`
12+
1. Click the radio button to select the EC2 instance for the lab. If you see no instance, wait a few minutes and then click refresh. Wait until an ec2 instance with name of `DynamoDBC9` is available before continuing. Select the instance.
13+
1. Click the **Start Session** button (This action will open a new tab in your browser with a new black shell).
14+
1. In the new black shell, switch to the ubuntu account by running `sudo su - ubuntu`
1515
```bash
16-
sudo su - ec2-user
16+
sudo su - ubuntu
1717
```
18-
1. run `shopt login_shell` and be sure it says `login_shell on`. Then, change into the workshop directory to begin: `cd ~/workshop`
19-
18+
1. run `shopt login_shell` and be sure it says `login_shell on` and then change into the workshop directory.
2019
```bash
2120
#Verify login_shell is 'on'
2221
shopt login_shell
2322
#Change into the workshop directory
24-
cd ~/workshop
23+
cd ~/workshop/
2524
```
2625

27-
The output of your commands in the Session Manager session should look like the following:
2826

27+
The output of your commands in the Session Manager session should look like the following:
2928
```bash
30-
sh-4.2$ sudo su - ec2-user
31-
[ec2-user@ip-172-31-24-0 ~]$ #Verify login_shell is 'on'
32-
[ec2-user@ip-172-31-24-0 ~]$ shopt login_shell
29+
$ sudo su - ubuntu
30+
:~ $ #Verify login_shell is 'on'
31+
shopt login_shell
32+
#Change into the workshop directory
33+
cd ~/workshop/
3334
login_shell on
34-
[ec2-user@ip-172-31-24-0 ~]$ #Change into the workshop directory
35-
[ec2-user@ip-172-31-24-0 ~]$ cd ~/workshop
35+
:~/workshop $
3636
```

content/design-patterns/setup/Step2.en.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ python --version
1414
Output:
1515

1616
```plain
17-
Python 3.6.12
17+
Python 3.10.12
1818
```
19+
**Note: The major and minor version of Python may vary from what you see above**
1920

2021
Run the following command to check the AWS CLI on your EC2 instance:
2122

@@ -28,9 +29,9 @@ Sample output:
2829

2930
```bash
3031
#Note that your linux kernel version may differ from the example.
31-
aws-cli/1.18.139 Python/3.6.12 Linux/4.14.193-113.317.amzn1.x86_64 botocore/1.17.62
32+
aws-cli/2.13.26 Python/3.11.6 Linux/6.2.0-1013-aws exe/x86_64.ubuntu.22 prompt/off
3233
```
3334

3435
{{% notice note %}}
35-
_Make sure you have AWS CLI version 1.18.139 and python 3.6.12 before proceeding. If you do not have these versions, review [Step 1]({{< ref "design-patterns/setup/Step1" >}}) to ensure you have completed each command correctly._
36+
_Make sure you have AWS CLI version 2.x or higher and python 3.10 or higher before proceeding. If you do not have these versions, you may have difficultly successfully completing the lab._
3637
{{% /notice %}}

content/design-patterns/setup/Step4.en.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ weight = 40
77
On the EC2 instance, go to the workshop folder and run the ls command:
88

99
```bash
10-
cd /home/ec2-user/workshop
10+
cd /home/ubuntu/workshop
1111
ls -l .
1212
```
1313

content/design-patterns/setup/_index.en.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ description = "Setup the lab environment and connect to the lab instance on Amaz
1212
To set up this workshop, choose one of the following links, depending on whether you are:
1313
- […running the workshop on your own (in your own account)]({{< ref "start-here/user-account/" >}}), or
1414
- […attending an AWS-hosted event (using AWS-provided access codes)]({{< ref "start-here/aws-ws-event/" >}}), or
15-
- (legacy)[…attending an AWS-hosted event (using AWS-provided hashes)]({{< ref "start-here/aws-event/" >}})
1615

1716
Once you have completed with either setup, continue on to:
1817
- [Exercise 1: DynamoDB Capacity Units and Partitioning]({{< ref "/design-patterns/ex1capacity" >}})

0 commit comments

Comments
 (0)