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
2 changes: 1 addition & 1 deletion content/change-data-capture/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This workshop is designed for developers, engineers, and database administrators

### Requirements
#### Basic knowledge of AWS services
- Among other services this lab will guide you through the use of [AWS Cloud9](https://aws.amazon.com/cloud9/) and [AWS Lambda](https://aws.amazon.com/lambda/).
- Among other services this lab will guide you through the use of Visual Studio Code and [AWS Lambda](https://aws.amazon.com/lambda/).

#### Basic understanding of DynamoDB
- If you’re not familiar with DynamoDB or are not participating in this lab as part of an AWS event, consider reviewing the documentation on "[What is Amazon DynamoDB?](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html)"
Expand Down
2 changes: 1 addition & 1 deletion content/dynamodb-opensearch-zetl/setup/on-your-own.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ chapter: true

## Launch the zETL CloudFormation stack

::alert[_Do not continue unless the Cloud9 CloudFormation Template has finished deploying._]
::alert[_Do not continue unless the Visual Studio Code CloudFormation Template has finished deploying._]

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=DynamoDBzETL&templateURL=:param{key="lhol_ddb_os_zetl_setup_yaml"})
*Optionally, download [the YAML template](:param{key="lhol_ddb_os_zetl_setup_yaml"}) and launch it your own way*
Expand Down
12 changes: 4 additions & 8 deletions content/event-driven-architecture/ex3fixbugs/Step3.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,19 @@ weight: 3

Congratulations, you successfully completed *Lab 2*! If you've made it here and still have time left, we have added one optional step to the workshop for you!

In this step, you will use an AWS Cloud9 instance and run a Python frontend that scans the DynamoDB `AggregateTable` twice per second and displays the results, i.e. the aggregated values for the different risk types, in your terminal.
In this step, you will use your Visual Studio Code (VS Code) terminal to run a Python frontend that scans the DynamoDB `AggregateTable` twice per second and displays the results, i.e. the aggregated values for the different risk types, in your terminal.

![Architecture-1](/static/images/event-driven-architecture/lab2/lab2-optional.png)

::alert[AWS Cloud9 is by far not the only option to run this Python-based frontend! If you're motivated, feel free to try running it locally on your PC (make sure you run `aws configure` first - you can get your credentials on the Workshop Studio dashboard), or from any EC2 instance (e.g. assign an IAM role to the EC2 instance that allows access to the `AggregateTable`).]
::alert[The VS Code terminal is by far not the only option to run this Python-based frontend! If you're motivated, feel free to try running it locally on your PC (make sure you run `aws configure` first - you can get your credentials on the Workshop Studio dashboard), or from any EC2 instance (e.g. assign an IAM role to the EC2 instance that allows access to the `AggregateTable`).]

## On your own? Start an AWS Cloud9 instance
Since you're clearly experienced with AWS - making it through all of the lab - we'll leave this task up to you!
Once you're Cloud9 instance is running, make sure that the required Python library `boto3` is installed:
## Open your VS Code terminal
Use the same Visual Studio Code environment you've been working in throughout this lab. If a terminal isn't already open, open a new one from the VS Code menu (Terminal → New Terminal). Make sure that the required Python library `boto3` is installed:

```python
pip3 install --user boto3
```

## At an AWS event? Connect to Cloud9
Navigate to the Cloud9 section of the AWS Management Console. Ensure you're in the correct region, the same as the resource you've worked with so far. There should be an IDE ready - click `Open`.

## Let's continue...
Now, you can copy the code below into a file, give it a descriptive name (e.g. `frontend.py`) and run it (`python3 frontend.py`). You should see the current aggregates from the `AggregationTable`, with new messages coming in every 60 seconds!

Expand Down
4 changes: 2 additions & 2 deletions content/game-player-data/core-usage/Step2.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ In DynamoDB on-demand capacity mode, you pay per request. The cost per request i

::alert[You can choose to run either the `create_table.py` python script or the AWS CLI command below. Both are provided to show different methods of interacting with DynamoDB.]

You can run the Python script with the following command in the Cloud9 Terminal.
You can run the Python script with the following command in the VS Code Terminal.

```sh
python scripts/create_table.py
Expand All @@ -74,7 +74,7 @@ The script should return this message:
Table 'battle-royale' created successfully.
```

As an alternative, you can run the AWS CLI command from your Cloud9 Terminal.
As an alternative, you can run the AWS CLI command from your VS Code Terminal.

```sh
aws dynamodb create-table \
Expand Down
5 changes: 2 additions & 3 deletions content/game-player-data/core-usage/Step4.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,12 @@ At the beginning of this script, you import the Boto 3 library and some simple c

The real work of the script happens in the `fetch_game_and_users` function that’s defined in the module. This is similar to a function you would define in your application to be used by any endpoints that need this data.

The `fetch_game_and_users` function does a few things. First, it makes a `Query` request to DynamoDB. This `Query` uses a `PK` of `GAME#<GameId>`. Then, it requests any entities where the sort key is between `#METADATA#<GameId>` and `USER$`. This grabs the `Game` entity, whose sort key is `#METADATA#<GameId>`, and all `UserGameMapping` entities, whose keys start with `USER#`. Sort keys of the string type are sorted by ASCII character codes. The dollar sign ($) comes directly after the pound sign (#) in [ASCII](http://support.ecisolutions.com/doc-ddms/help/reportsmenu/ascii_sort_order_chart.htm), so this ensures that you will get all mappings in the `UserGameMapping` entity.

The `fetch_game_and_users` function does a few things. First, it makes a `Query` request to DynamoDB. This `Query` uses a `PK` of `GAME#<GameId>`. Then, it requests any entities where the sort key is between `#METADATA#<GameId>` and `USER$`. This grabs the `Game` entity, whose sort key is `#METADATA#<GameId>`, and all `UserGameMapping` entities, whose keys start with `USER#`. Sort keys of the string type are sorted by ASCII character codes. The dollar sign ($) comes directly after the pound sign (#) in [ASCII](https://en.wikipedia.org/wiki/ASCII#Order), so this ensures that you will get all mappings in the `UserGameMapping` entity.
When you receive a response, you assemble the data entities into objects known by the application. You know that the first entity returned is the `Game` entity, so you create a `Game` object from the entity. For the remaining entities, you create a `UserGameMapping` object for each entity and then attach the array of users to the `Game` object.

The end of the script shows the usage of the function and prints out the resulting objects.

You can run the script in the Cloud9 Terminal with the following command:
You can run the script in the VS Code Terminal with the following command:

```sh
python scripts/fetch_game_and_players.py
Expand Down
2 changes: 1 addition & 1 deletion content/game-player-data/index.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "LGME: Modeling Game Player Data with Amazon DynamoDB"
chapter: true
description: "300 level: Hands-on exercise with Cloud9, Python, and data modelling best practices."
description: "300 level: Hands-on exercise with Visual Studio Code, Python, and data modelling best practices."
weight: 50
---

Expand Down
2 changes: 1 addition & 1 deletion content/game-player-data/open-games/Step2.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ It will take a few minutes for the new GSI to get populated. You need to wait un

- Checking under **Services**, **Database**, **DynamoDB** in the AWS console.

- Running the command below in the Cloud9 Terminal:
- Running the command below in the VS Code Terminal:
```sh
aws dynamodb describe-table --table-name battle-royale --query "Table.GlobalSecondaryIndexes[].IndexStatus"
```
Expand Down
2 changes: 1 addition & 1 deletion content/game-player-data/past-games/Step1.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ It will take a few minutes for the new secondary index to get populated. You nee
You can find out the current status of the table and its indexes by either way:
- Checking under **Services**, **Database**, **DynamoDB** in the AWS console.

- Running the command below in the Cloud9 Terminal:
- Running the command below in the VS Code Terminal:
```sh
aws dynamodb describe-table --table-name battle-royale --query "Table.GlobalSecondaryIndexes[].IndexStatus"
```
Expand Down
2 changes: 1 addition & 1 deletion content/game-player-data/setup/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In this module, you'll configure your environment and download code that you wil

To set up this workshop, choose one of the following paths, depending on whether you are:

::alert[If following the lab in your own AWS Account, you will create DynamoDB tables that will incur a cost that could approach tens of dollars per day. **Ensure you delete the DynamoDB tables using the DynamoDB console, and make sure you [delete the Visual Studio Code instance](https://docs.aws.amazon.com/cloud9/latest/user-guide/delete-environment.html) as soon as the lab is complete**.]{type="warning"}
::alert[If following the lab in your own AWS Account, you will create DynamoDB tables that will incur a cost that could approach tens 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"}

- :link[…running the workshop on your own (in your own AWS account)]{href="/game-player-data/setup/on-your-own"}, which guides you to launch a Visual Studio Code instance using Cloud Formation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ Enjoy the lab!

To set up this workshop, choose one of the following paths, depending on whether you are:

::alert[If following the lab in your own AWS Account, you will create DynamoDB table(s) that will incur a cost that could approach many dollars a day. **Ensure you delete the DynamoDB tables using the DynamoDB console, and make sure you [delete the Cloud9 environment](https://docs.aws.amazon.com/cloud9/latest/user-guide/delete-environment.html) as soon as the lab is complete**.]{type="warning"}
::alert[If following the lab in your own AWS Account, you will create DynamoDB table(s) that will incur a cost that could approach many dollars a 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"}

- :link[…running the workshop on your own (in your own AWS account)]{href="/global-serverless-application/getting_started/on-your-own"}, which guides you to launch a Cloud9 environment using CloudFormation
- :link[…running the workshop on your own (in your own AWS account)]{href="/global-serverless-application/getting_started/on-your-own"}, which guides you to launch a Visual Studio Code instance using CloudFormation

- :link[…attending an AWS-hosted event (using AWS-provided access-code)]{href="/global-serverless-application/getting_started/aws-ws-event"}

Expand Down
2 changes: 1 addition & 1 deletion content/hands-on-labs/index.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "LHOL: Hands-on Labs for Amazon DynamoDB"
chapter: true
description: "200 level: Hands-on exercises with Cloud9 using the AWS CLI and Console."
description: "200 level: Hands-on exercises with VS Code using the AWS CLI and Console."
weight: 10
---
In this workshop, you will learn to create and work with [Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html).
Expand Down
2 changes: 1 addition & 1 deletion content/hands-on-labs/setup/create-tables.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 14

We will now create tables (and in a subsequent step load data into them) based on [sample data from the DynamoDB Developer Guide](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SampleData.html).

Copy the `create-table` commands below and paste them into your AWS Cloud9 command prompt, hitting enter on the last command to execute it. Then use the corresponding `wait` commands by pasting them into the same terminal and running them.
Copy the `create-table` commands below and paste them into your VS Code terminal, hitting enter on the last command to execute it. Then use the corresponding `wait` commands by pasting them into the same terminal and running them.

```bash
aws dynamodb create-table \
Expand Down
2 changes: 1 addition & 1 deletion content/hands-on-labs/setup/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ chapter: true
---


In this chapter, we'll cover the prerequisites needed to get started with [Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html). You'll create DynamoDB tables and use a AWS Cloud9 envrironment to query these tables.
In this chapter, we'll cover the prerequisites needed to get started with [Amazon DynamoDB](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Introduction.html). You'll create DynamoDB tables and use a Visual Studio Code environment to query these tables.

The deployment architecture that you will be building in this lab will look like the below.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The web app we have been using includes forms and buttons to perform standard CR

The web app makes HTTP calls to the published API using standard GET and POST methods against certain API paths.

1. In Cloud9, open the left nav and locate the file **app.py**
1. In VS Code, open the left nav and locate the file **app.py**
2. Double click to open and review this file

In the bottom half of the file you will see several small handler functions that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ to create the MySQL-ready middle tier.

We can repeat this to create a new API Gateway and Lambda stack, this time using the DynamoDB stage.

1. Within the Cloud9 terminal window, run:
1. Within the VS Code terminal window, run:
```bash
chalice deploy --stage dynamodb
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ to make sure they work against the DynamoDB table.

Let's make a small code change to demonstrate the process to customize the DynamoDB functions.

6. In Cloud9, left nav, locate the chalicelib folder and open it.
6. In VS Code, left nav, locate the chalicelib folder and open it.
7. Locate and open the file dynamodb_calls.py
8. Search for the text ```get_request['ConsistentRead'] = False```
9. Update this from False to True and click File/Save to save your work.
Expand Down
2 changes: 1 addition & 1 deletion content/relational-migration/data migration/index3.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ aws dynamodb describe-import \

We can also check the import status within the AWS Console.

3. Click into the separate browser tab titled "AWS Cloud9" to open the AWS Console.
3. Switch to the separate browser tab with the AWS Management Console open.
4. In the search box, type DynamoDB to visit the DyanmoDB console.
5. From the left nav, click Imports from S3.
6. Notice your import is listed along with the current status.
Expand Down
2 changes: 1 addition & 1 deletion content/relational-migration/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ You can review this guidance when considering and planning your own relational m

## Workshop overview

The workshop provides a MySQL instance running on EC2, a Cloud9 developer workstation,
The workshop provides a MySQL instance running on EC2, a Visual Studio Code developer workstation,
and an S3 bucket for staging data.

You will create a serverless API and Python Lambda function that
Expand Down
2 changes: 1 addition & 1 deletion content/relational-migration/setup/index3.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ weight : 18

For your convenience, a single script can setup and populate the relational database schema.

1. From the Cloud9 terminal, run
1. From the VS Code terminal, run

```bash
./setup_tables.sh
Expand Down
Loading