Skip to content

Commit 012d89e

Browse files
committed
LMR updates
1 parent 5074404 commit 012d89e

File tree

3 files changed

+77
-47
lines changed

3 files changed

+77
-47
lines changed

content/global-serverless-application/getting_started/aws-ws-event.en.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,29 @@ chapter: true
77

88
### Login to AWS Workshop Studio Portal
99

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

1212
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.
13-
1413
![Workshop Studio Landing Page](/static/images/aws-ws-event1.png)
1514

1615
3. On the next, **Sign in** page, choose **Email One-Time Passcode (OTP)** to sign in to your workshop page.
17-
1816
![Sign in page](/static/images/aws-ws-event2.png)
1917

2018
4. Provide an email address to receive a one-time passcode.
21-
2219
![Email address input](/static/images/aws-ws-event3.png)
2320

2421
5. Enter the passcode that you received in the provided email address, and click **Sign in**.
2522

2623
6. Next, in the textbox, enter the event access code (eg: abcd-012345-ef) that you received from the event facilitators. If you are provided a one-click join link, you will be redirected to the next step automatically.
27-
2824
![Event access code](/static/images/aws-ws-event4.png)
2925

3026
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.
3127

3228
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.
29+
![Event dashboard](/static/images/common/workshop-studio-01.png)
30+
31+
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`.
3332

34-
![Event dashboard](/static/images/aws-ws-event5.png)
33+
![Event dashboard](/static/images/common/workshop-studio-02.png)
3534

3635
9. Now that you are connected continue on to: :link[Module 1]{href="/global-serverless-application/module_1"}.

content/global-serverless-application/getting_started/on-your-own.en.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,29 @@ weight: 5
55
chapter: true
66
---
77

8-
::alert[These setup instructions are identitical for LADV, LHOL, LBED, LMR, 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"}
8+
::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"}
99

10-
::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="/global-serverless-application/getting_started/aws-ws-event"}]
10+
::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"}]
1111

1212
## Launch the CloudFormation stack
1313
::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.]
1414

15-
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"})
16-
*Optionally, download [the YAML template](:param{key="design_patterns_s3_lab_yaml"}) and launch it your own way*
15+
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"})
1716

18-
2. Click *Next* on the first dialog.
17+
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*
1918

20-
3. 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.
21-
Leave the *WorkshopZIP* parameter unchanged and click *Next*
19+
1. Click *Next* on the first dialog.
2220

23-
![CloudFormation parameters](/static/images/awsconsole1.png)
21+
1. Provide a CloudFormation stack name.
2422

25-
4. 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*.
26-
27-
![Acknowledge IAM role capabilities](/static/images/awsconsole2.png)
28-
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.
23+
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*.
24+
25+
![CloudFormation parameters](/static/images/common/on-your-own-cf-01.png)
26+
27+
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*.
28+
29+
![CloudFormation parameters](/static/images/common/on-your-own-cf-02.png)
30+
31+
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.
2932

3033
5. After the CloudFormation stack is `CREATE_COMPLETE`, :link[continue onto Module 1]{href="/global-serverless-application/module_1"}.

content/global-serverless-application/module_1/index.en.md

Lines changed: 57 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,54 @@ title : "Module 1: Deploy the backend resources"
33
weight : 20
44
---
55

6+
### Login to AWS Workshop Studio Portal
67

7-
## Setup Steps
8-
This lab requires a terminal shell with Python3 and the AWS Command Line Interface (CLI) installed and configured with admin credentials.
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.
9+
![Event dashboard](/static/images/common/workshop-studio-01.png)
910

10-
We will use AWS Cloud9 for this event. [AWS Cloud9](https://aws.amazon.com/cloud9/) is a cloud-based integrated development environment (IDE) that lets you write, run, and debug code with just a browser. AWS Cloud9 includes a code editor, debugger, and terminal. It also comes prepackaged with essential tools for popular programming languages and the AWS Command Line Interface (CLI) preinstalled so that you don’t have to install files or configure your laptop for this lab. Your AWS Cloud9 environment will have access to the same AWS resources as the user with which you signed in to the AWS Management Console.
11+
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`.
1112

12-
### To set up your AWS Cloud9 development environment:
13+
![Event dashboard](/static/images/common/workshop-studio-02.png)
1314

14-
1. Choose **Services** at the top of the page, and then choose **Cloud9** under **Developer Tools**.
15-
16-
2. There will be an environment ready to use under **My environments**.
15+
During the first 60 seconds, the environment will automatically update extensions and plugins. Any startup notification can be safely dismissed.
16+
17+
![VS Code Setup](/static/images/common/common-vs-code-01.png)
1718

18-
3. Click on **Open** under **Cloud9 IDE**, and your IDE should open with a welcome note.
19+
If a terminal is not available at the bottom left side of your screen, please open a new one like the following picture indicates.
1920

20-
You should now see your AWS Cloud9 environment. You need to be familiar with the three areas of the AWS Cloud9 console shown in the following screenshot:
21+
![VS Code Setup](/static/images/common/common-vs-code-02.png)
2122

22-
![Cloud9 Environment](/static/images/global-serverless-application/module_1/cloud9-environment.png)
23+
Then run the command `aws sts get-caller-identity` just to verify that your AWS credentials have been properly configured.
2324

24-
- **File explorer**: On the left side of the IDE, the file explorer shows a list of the files in your directory.
25-
26-
- **File editor**: On the upper right area of the IDE, the file editor is where you view and edit files that you’ve selected in the file explorer.
27-
28-
- **Terminal**: On the lower right area of the IDE, this is where you run commands to execute code samples.
25+
![VS Code Setup](/static/images/common/common-vs-code-03.png)
2926

30-
### Verify Environment
31-
1. Run ```aws sts get-caller-identity``` to verify the AWS CLI is functioning
32-
2. Run ```python3 --version``` to verify that python3 is installed
33-
3. Your Cloud9 environment is already configured with boto3, but for this lab we will also need AWS Chalice.
34-
Run ```sudo python3 -m pip install chalice``` to install [AWS Chalice](https://github.com/aws/chalice).
27+
28+
From within the terminal:
29+
30+
To keep our python files and dependencies organized lets create a python virtual environment, in the LMR folder:
31+
32+
```bash
33+
cd LMR
34+
python -m venv .venv
35+
source .venv/bin/activate
36+
```
37+
38+
Your VS Code environment is already configured with boto3, but for this lab we will also need [AWS Chalice](https://github.com/aws/chalice).
39+
40+
```bash
41+
pip install chalice
42+
```
3543

3644
::alert[You may see a couple of WARNING lines near the bottom of the command output, these are safely ignored.]{type="info"}
3745

38-
4. Run ```curl -O https://amazon-dynamodb-labs.com/assets/global-serverless.zip```
39-
5. Run ```unzip global-serverless.zip && cd global-serverless```
40-
6. To see what application resources we will be deploying you can open the **app.py** file by navigating to "global-serverless/app.py" in the file explorer. This code defines Lambda function and API Gateway routes.
46+
Download the global serverless workshop:
47+
48+
```bash
49+
curl -O https://amazon-dynamodb-labs.com/assets/global-serverless.zip
50+
unzip global-serverless.zip && cd global-serverless
51+
```
52+
53+
To see what application resources we will be deploying you can open the **app.py** file by navigating to "global-serverless/app.py" in the file explorer. This code defines Lambda function and API Gateway routes.
4154

4255
### Deploy a new DynamoDB table
4356
1. In your terminal, run:
@@ -121,10 +134,18 @@ aws dynamodb get-item \
121134

122135
### Deploy the backend API service to the first region
123136

124-
1. Run ```export AWS_DEFAULT_REGION=us-west-2``` to instruct Chalice to deploy into us-west-2 for our first region
125-
2. Run ```chalice deploy``` and wait for the infrastructure to be created. Chalice is a Python based serverless framework.
137+
1. Run the following instruction to instruct Chalice to deploy into us-west-2 for our first region
138+
```bash
139+
export AWS_DEFAULT_REGION=us-west-2
140+
```
141+
142+
2. Run the following instruction and wait for the infrastructure to be created. Chalice is a Python based serverless framework.
143+
```bash
144+
chalice deploy
145+
```
146+
126147
3. When the script completes, it reports a list of resources deployed. **Copy and paste the Rest API URL into a note as you will need it later.**
127-
4. Copy that REST API URL and paste it into a new browser tab to test it. You should see a JSON response of {ping: "ok"}
148+
4. Copy that REST API URL and paste it into a new browser tab to test it. You should see a JSON response of `{ping: "ok"}`
128149
5. You can type in certain paths to the end of the URL. Add the word scan so that the URL now ends with ```/api/scan```
129150
You should see a JSON response representing the results of a table scan.
130151

@@ -149,13 +170,20 @@ Click Ping again and check the latency.
149170
You now have a test harness where you can perform reads and writes to a DynamoDB record via the custom API.
150171

151172
### Deploy the service stack to the second region, Ireland
152-
1. Run ```export AWS_DEFAULT_REGION=eu-west-1``` to instruct Chalice to deploy into eu-west-1 for our second region.
153-
2. Run ```chalice deploy``` and wait for the infrastructure to be created in eu-west-1.
173+
1. Run the following instruction to instruct Chalice to deploy into eu-west-1 for our second region.
174+
```bash
175+
export AWS_DEFAULT_REGION=eu-west-1
176+
```
177+
178+
2. Run the following instruction and wait for the infrastructure to be created in eu-west-1.
179+
```bash
180+
chalice deploy
181+
```
154182
3. When the script completes, it reports a list of resources deployed. Again, copy down the new REST API URL to a note for later use.
155183
4. Return to the web app.
156184
5. Click **Add API** again and paste in the new API URL. A second row of buttons appears in an alternate color.
157185

158-
Note: In this workshop you have permissions for Global Tables in us-west-2 and eu-west-1.
186+
Note: In this workshop you have permissions for Global Tables in `us-west-2` and `eu-west-1`.
159187
In your own account you could add any number of replicas in any regions.
160188

161189
Note 2: If you make any changes to the code in ```app.py```, you can push the updates to your Lambda function

0 commit comments

Comments
 (0)