Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions content/authors.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ weight: 100
1. Sean Shriver ([switch180](https://github.com/switch180)) - Ported the whole lab to amazon-dynamodb-labs.com with a custom Hugo theme. Made the "bullet-proof" CloudFormation template for the lab. Updated the hands on lab to Python3
1. Daniel Yoder ([danielsyoder](https://github.com/danielsyoder)) - The brains behind amazon-dynamodb-labs.com and the co-creator of the design scenarios

### 2025 additions
Removing Cloud9 due to End of Life from all the workshops (October 2025):
1. Esteban Serna ([@tebanieo](https://github.com/tebanieo)) - Primary author, and merger

Database modernizer workshop was released in August 2025:
1. Esteban Serna ([@tebanieo](https://github.com/tebanieo)) - Primary author, and merger
2. John Terhune - ([@terhunej](https://github.com/terhunej)) - Editor, tech reviewer.
3. Sean Shriver - ([@switch180](https://github.com/switch180)) - Tech reviewer

### 2024 additions
The Generative AI workshop LBED was released in early 2024:
1. John Terhune - ([@terhunej](https://github.com/terhunej)) - Primary author
Expand Down
2 changes: 1 addition & 1 deletion content/design-patterns/ex1capacity/Step2.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ weight: 3

Now that you have created the table, you can load some sample data into the table by running the following Python script.
```bash
cd /home/ubuntu/workshop
cd /home/participant/workshop/LADV
python load_logfile.py logfile ./data/logfile_small1.csv
```
The parameters in the preceding command: 1) Table name = `logfile` 2) File name = `logfile_small1.csv`
Expand Down
56 changes: 27 additions & 29 deletions content/design-patterns/setup/Step1.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,30 @@ date: 2019-12-02T10:07:45-08:00
weight: 10
---

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.
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.
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.
1. Choose **Start session** to launch a shell session.
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.
1. Click the **Start Session** button (This action will open a new tab in your browser with a new black shell).
1. In the new black shell, switch to the ubuntu account by running `sudo su - ubuntu`
```bash
sudo su - ubuntu
```
1. run `shopt login_shell` and be sure it says `login_shell on` and then change into the workshop directory.
```bash
#Verify login_shell is 'on'
shopt login_shell
#Change into the workshop directory
cd ~/workshop/
```


The output of your commands in the Session Manager session should look like the following:
```bash
$ sudo su - ubuntu
:~ $ #Verify login_shell is 'on'
shopt login_shell
#Change into the workshop directory
cd ~/workshop/
login_shell on
:~/workshop $
```
During the first 60 seconds, the environment will automatically update extensions and plugins. Any startup notification can be safely dismissed.

![VS Code Setup](/static/images/common/common-vs-code-01.png)

If a terminal is not available at the bottom left side of your screen, please open a new one like the following picture indicates.

![VS Code Setup](/static/images/common/common-vs-code-02.png)

Then run the command `aws sts get-caller-identity` just to verify that your AWS credentials have been properly configured.

![VS Code Setup](/static/images/common/common-vs-code-03.png)

Change your directory to use LADV and browse the content:

```shell
cd LADV
```

```shell
participant:~/workshop/LADV$ ls
data iam-trust-relationship.json load_logfile_parallel.py query_responsecode.py scan_logfile_simple.py
ddbreplica_lambda.py lab_config.py query_city_dept.py requirements.txt
gsi_city_dept.json load_employees.py query_employees.py scan_for_managers.py
gsi_manager.json load_invoice.py query_index_invoiceandbilling.py scan_for_managers_gsi.py
iam-role-policy.json load_logfile.py query_invoiceandbilling.py scan_logfile_parallel.py
participant:~/workshop/LADV$
```
4 changes: 2 additions & 2 deletions content/design-patterns/setup/Step2.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python --version
Output:

```plain
Python 3.10.12
Python 3.13.9
```
**Note: The major and minor version of Python may vary from what you see above**

Expand All @@ -29,7 +29,7 @@ Sample output:

```bash
#Note that your linux kernel version may differ from the example.
aws-cli/2.13.26 Python/3.11.6 Linux/6.2.0-1013-aws exe/x86_64.ubuntu.22 prompt/off
aws-cli/2.31.24 Python/3.13.7 Linux/6.1.155-176.282.amzn2023.aarch64 exe/aarch64.amzn.2023
```

::alert[_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._]
57 changes: 26 additions & 31 deletions content/design-patterns/setup/Step4.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,43 +7,38 @@ weight: 40
On the EC2 instance, go to the workshop folder and run the ls command:

```bash
cd /home/ubuntu/workshop
participant:~/workshop/LADV$ cd /home/participant/workshop/LADV
ls -l .
```

The following list indicates the folder structure and the files that will be used during the workshop:

```bash
.
├── data
│ ├── employees.csv
│ ├── invoice-data2.csv
│ ├── invoice-data.csv
│ ├── logfile_medium1.csv
│ ├── logfile_medium2.csv
│ ├── logfile_small1.csv
│ └── logfile_stream.csv
├── ddbreplica_lambda.py
├── ddb-replication-role-arn.txt
├── gsi_city_dept.json
├── gsi_manager.json
├── iam-role-policy.json
├── iam-trust-relationship.json
├── lab_config.py
├── load_employees.py
├── load_invoice.py
├── load_logfile_parallel.py
├── load_logfile.py
├── query_city_dept.py
├── query_employees.py
├── query_index_invoiceandbilling.py
├── query_invoiceandbilling.py
├── query_responsecode.py
├── requirements.txt
├── scan_for_managers_gsi.py
├── scan_for_managers.py
├── scan_logfile_parallel.py
└── scan_logfile_simple.py

participant:~/workshop/LADV$ ls -l .
total 80
drwxr-xr-x. 2 participant participant 182 Oct 29 16:30 data
-rw-r--r--. 1 participant participant 1275 Sep 10 22:37 ddbreplica_lambda.py
-rw-r--r--. 1 participant participant 438 Sep 10 22:37 gsi_city_dept.json
-rw-r--r--. 1 participant participant 438 Sep 10 22:37 gsi_manager.json
-rw-r--r--. 1 participant participant 865 Sep 10 22:37 iam-role-policy.json
-rw-r--r--. 1 participant participant 205 Sep 10 22:37 iam-trust-relationship.json
-rw-r--r--. 1 participant participant 94 Sep 10 22:37 lab_config.py
-rw-r--r--. 1 participant participant 3845 Sep 10 22:37 load_employees.py
-rw-r--r--. 1 participant participant 2198 Sep 10 22:37 load_invoice.py
-rw-r--r--. 1 participant participant 1763 Sep 10 22:37 load_logfile.py
-rw-r--r--. 1 participant participant 3101 Sep 10 22:37 load_logfile_parallel.py
-rw-r--r--. 1 participant participant 1466 Sep 10 22:37 query_city_dept.py
-rw-r--r--. 1 participant participant 1071 Sep 10 22:37 query_employees.py
-rw-r--r--. 1 participant participant 2547 Sep 10 22:37 query_index_invoiceandbilling.py
-rw-r--r--. 1 participant participant 2341 Sep 10 22:37 query_invoiceandbilling.py
-rw-r--r--. 1 participant participant 1887 Sep 10 22:37 query_responsecode.py
-rw-r--r--. 1 participant participant 32 Sep 10 22:37 requirements.txt
-rw-r--r--. 1 participant participant 1287 Sep 10 22:37 scan_for_managers.py
-rw-r--r--. 1 participant participant 1157 Sep 10 22:37 scan_for_managers_gsi.py
-rw-r--r--. 1 participant participant 2019 Sep 10 22:37 scan_logfile_parallel.py
-rw-r--r--. 1 participant participant 1278 Sep 10 22:37 scan_logfile_simple.py
participant:~/workshop/LADV$
```

Python code:
Expand Down
13 changes: 6 additions & 7 deletions content/design-patterns/setup/Step5.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ The Server Logs file has the following structure:
- bytessent (number)
- useragent (string)

To view a sample record in the file, execute:
```bash
head -n1 ./data/logfile_small1.csv
```
To view a sample record in the file, just click on the files over the left side pannel:

![Small file](/static/images/ladv-small-file.png)


Sample log record:
```csv
1,66.249.67.3,2017-07-20,20,GMT-0700,GET,"/gallery/main.php?g2_controller=exif.SwitchDetailMode&g2_mode=detailed&g2_return=%2Fgallery%2Fmain.php%3Fg2_itemId%3D15741&g2_returnName=photo",302,5,"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
Expand All @@ -47,9 +48,7 @@ The Employees data file has the following structure:
- is a manager (string), 1 for manager employees, non-existent for others

To view a sample record in the file, execute:
```bash
head -n1 ./data/employees.csv
```

Sample employee record:
```csv
1,Onfroi Greeno,Systems Administrator,Operation,Portland,OR,1992-03-31,2014-10-24,Application Support Analyst,2014-04-12
Expand Down
10 changes: 7 additions & 3 deletions content/design-patterns/setup/aws-ws-event.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Start: At an AWS Hosted Event"
date: 2019-12-02T07:05:12-08:00
weight: 3
weight: 4
chapter: true
---

Expand All @@ -26,6 +26,10 @@ chapter: true
7. Select on **I agree with the Terms and Conditions** on the bottom of the next page and click **Join event** to continue to the event dashboard.

8. On the event dashboard, click on **Open AWS console** to federate into AWS Management Console in a new tab. On the same page, click **Get started** to open the workshop instructions.
![Event dashboard](/static/images/aws-ws-event5.png)
![Event dashboard](/static/images/common/workshop-studio-01.png)

9. Now that you are connected continue on to: :link[Step 1]{href="/design-patterns/setup/Step1"}.
9. In addition to the AWS console you should open your Visual Studio code server, by clicking in the `VSCodeServerURL` parameter, available from the "Event Outputs" section. When prompted for a password use the value from `VSCodeServerPassword`.

![Event dashboard](/static/images/common/workshop-studio-02.png)

10. Continue with the steps as listed in the section :link[Launch Visual Studio Code]{href="/design-patterns/setup/step1"}.
27 changes: 16 additions & 11 deletions content/design-patterns/setup/user-account.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,30 @@ weight: 5
chapter: true
---

::alert[These setup instructions are identitical for LADV, LHOL, LMR, LBED, and LGME - all of which use the same Cloud9 template. Only complete this section once, and only if you're running it on your own account.]{type="warning"}

::alert[Only complete this section if you are running the workshop on your own. If you are at an AWS hosted event (such as re\:Invent, Immersion Day, etc), go to :link[At an AWS hosted Event]{href="/design-patterns/setup/aws-ws-event"}]
::alert[These setup instructions are identitical for LADV, LHOL, LBED, LMR, and LGME - all of which use the same Visual Studio Code template. Only complete this section once, and only if you're running it on your own account.]{type="warning"}

::alert[Only complete this section if you are running the workshop on your own. If you are at an AWS hosted event (such as re\:Invent, Immersion Day, etc), go to :link[At an AWS hosted Event]{href="/hands-on-labs/setup/aws-ws-event"}]

## Launch the CloudFormation stack
::alert[During the course of the lab, you will make DynamoDB tables that will incur a cost that could approach tens or hundreds of dollars per day. Ensure you delete the DynamoDB tables using the DynamoDB console, and make sure you delete the CloudFormation stack as soon as the lab is complete.]

1. Launch the CloudFormation template in US West 2 to deploy the resources in your account: [![CloudFormation](/static/images/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=DynamoDBID&templateURL=:param{key="design_patterns_s3_lab_yaml"})
1. *Optionally, download [the YAML template](:param{key="design_patterns_s3_lab_yaml"}) and launch it your own way*
1. **[Deprecated]** - Launch the CloudFormation template in US West 2 to deploy the resources in your account: [![CloudFormation](/static/images/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=DynamoDBID&templateURL=:param{key="design_patterns_s3_lab_yaml"})

1. *Optionally, download [the YAML template](https://github.com/aws-samples/aws-dynamodb-examples/blob/master/workshops/modernizer/modernizer-db.yaml) from our GitHub repository and launch it your own way*

1. Click *Next* on the first dialog.

1. In the Parameters section, note the *Timeout* is set to zero. This means the Cloud9 instance will not sleep; you may want to change this manually to a value such as 60 to protect against unexpected charges if you forget to delete the stack at the end.
Leave the *WorkshopZIP* parameter unchanged and click *Next*
![CloudFormation parameters](/static/images/awsconsole1.png)
1. Provide a CloudFormation stack name.

1. In the Parameters section, note the *AllowedIP** contains a default IP Address, if you want to access the instance via SSH obtain your own public IP address. Ensure to add the `/32` network mask at the end. Do not modify any other parameter and click *Next*.

![CloudFormation parameters](/static/images/common/on-your-own-cf-01.png)

1. Scroll to the bottom and click *Next*, and then review the *Template* and *Parameters*. When you are ready to create the stack, scroll to the bottom, check the box acknowledging the creation of IAM resources, and click *Create stack*.
![CloudFormation parameters](/static/images/awsconsole2.png)
The stack will create a Cloud9 lab instance, a role for the instance, and a role for the AWS Lambda function used later on in the lab. It will use Systems Manager to configure the Cloud9 instance.
6. Scroll to the bottom and click *Next*, and then review the *Template* and *Parameters*. When you are ready to create the stack, scroll to the bottom, check the box acknowledging the creation of IAM resources, and click *Create stack*.

![CloudFormation parameters](/static/images/common/on-your-own-cf-02.png)

The stack will create a Visual Studio Code EC2 instance, a role for the instance, and a role for the AWS Lambda function used later on in the lab. The CloudFormation template will create a set of folders that can be used to execute individually the lab modules presented in this guide.

1. After the CloudFormation stack is `CREATE_COMPLETE`, :link[continue onto Step 1]{href="/design-patterns/setup/Step1"}.
7. After the CloudFormation stack is `CREATE_COMPLETE`, :link[Launch Visual Studio Code]{href="/design-patterns/setup/step1"}.
10 changes: 8 additions & 2 deletions content/event-driven-architecture/setup/aws-ws-event.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ chapter: true

### Login to AWS Workshop Studio Portal

1. If you are provided a one-click join link, skip to step 3.
### Login to AWS Workshop Studio Portal

1. If you are provided a one-click join link, use it and skip to step 3.

2. Visit [https://catalog.us-east-1.prod.workshops.aws](https://catalog.us-east-1.prod.workshops.aws). If you attended any other workshop earlier on this portal, please logout first. Click on **Get Started** on the right hand side of the window.
![Workshop Studio Landing Page](/static/images/aws-ws-event1.png)
Expand All @@ -26,6 +28,10 @@ chapter: true
7. Select on **I agree with the Terms and Conditions** on the bottom of the next page and click **Join event** to continue to the event dashboard.

8. On the event dashboard, click on **Open AWS console** to federate into AWS Management Console in a new tab. On the same page, click **Get started** to open the workshop instructions.
![Event dashboard](/static/images/aws-ws-event5.png)
![Event dashboard](/static/images/common/workshop-studio-01.png)

9. In addition to the AWS console you should open your Visual Studio code server, by clicking in the `VSCodeServerURL` parameter, available from the "Event Outputs" section. When prompted for a password use the value from `VSCodeServerPassword`.

![Event dashboard](/static/images/common/workshop-studio-02.png)

Now that you are set up, continue on to: :link[Exercise 1: Overview]{href="/event-driven-architecture/ex1overview"}.
25 changes: 18 additions & 7 deletions content/event-driven-architecture/setup/user-account.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,30 @@ weight: 5
chapter: true
---

::alert[These setup instructions are identitical for LADV, LHOL, LBED, LMR, and LGME - all of which use the same Visual Studio Code template. Only complete this section once, and only if you're running it on your own account.]{type="warning"}

::alert[Only complete this section if you are running the workshop on your own. If you are at an AWS hosted event (such as re\:Invent, Immersion Day, etc), go to :link[At an AWS hosted Event]{href="/hands-on-labs/setup/aws-ws-event"}]

::alert[Only complete this section if you are running the workshop on your own. If you are at an AWS hosted event (such as re\:Invent, Immersion Day, etc), go to :link[At an AWS hosted Event]{href="/event-driven-architecture/setup/start-here/aws-ws-event"}]
## Launch the CloudFormation stack
::alert[During the course of the lab, you will make DynamoDB tables that will incur a cost that could approach tens or hundreds of dollars per day. Ensure you delete the DynamoDB tables using the DynamoDB console, and make sure you delete the CloudFormation stack as soon as the lab is complete.]{type="warning"}
::alert[During the course of the lab, you will make DynamoDB tables that will incur a cost that could approach tens or hundreds of dollars per day. Ensure you delete the DynamoDB tables using the DynamoDB console, and make sure you delete the CloudFormation stack as soon as the lab is complete.]

1. **[Deprecated]** - Launch the CloudFormation template in US West 2 to deploy the resources in your account: [![CloudFormation](/static/images/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=DynamoDBID&templateURL=:param{key="design_patterns_s3_lab_yaml"})

1. Launch the CloudFormation template in US West 2 to deploy the resources in your account: [![CloudFormation](/static/images/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/new?stackName=amazon-dynamodb-labs&templateURL=:param{key="event_driven_architecture_lab_yaml"})
1. *Optionally, download [the YAML template](:param{key="event_driven_architecture_lab_yaml"}) and launch it your own way*
1. *Optionally, download [the YAML template](https://github.com/aws-samples/aws-dynamodb-examples/blob/master/workshops/modernizer/modernizer-db.yaml) from our GitHub repository and launch it your own way*

1. Click *Next* on the first dialog.

1. Scroll to the bottom and click *Next*, and then review the *Template*. When you are ready to create the stack, scroll to the bottom, check the box acknowledging the creation of IAM resources, and click *Create stack*.
![CloudFormation parameters](/static/images/awsconsole2.png)
The stack will create DynamoDB tables, Lambda functions, Kinesis streams, and IAM roles and policies which will be used later on in the lab.
1. Provide a CloudFormation stack name.

1. In the Parameters section, note the *AllowedIP** contains a default IP Address, if you want to access the instance via SSH obtain your own public IP address. Ensure to add the `/32` network mask at the end. Do not modify any other parameter and click *Next*.

![CloudFormation parameters](/static/images/common/on-your-own-cf-01.png)

6. Scroll to the bottom and click *Next*, and then review the *Template* and *Parameters*. When you are ready to create the stack, scroll to the bottom, check the box acknowledging the creation of IAM resources, and click *Create stack*.

![CloudFormation parameters](/static/images/common/on-your-own-cf-02.png)

The stack will create a Visual Studio Code EC2 instance, a role for the instance, and a role for the AWS Lambda function used later on in the lab. The CloudFormation template will create a set of folders that can be used to execute individually the lab modules presented in this guide.

1. After the CloudFormation stack is `CREATE_COMPLETE`, :link[continue onto the overview]{href="/event-driven-architecture/ex1overview"}.

Expand Down
Loading