Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor typos and formatting #248

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
18 changes: 9 additions & 9 deletions WebApplication/1_StaticWebHosting/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Module 1: Static Web Hosting with AWS Amplify Console

In this module you'll configure AWS Amplify Console to host the static resources for your web application. In subsequent modules you'll add dynamic functionality to these pages using JavaScript to call remote RESTful APIs built with AWS Lambda and Amazon API Gateway.
In this module, you'll configure AWS Amplify Console to host the static resources for your web application. In subsequent modules you'll add dynamic functionality to these pages using JavaScript to call remote RESTful APIs built with AWS Lambda and Amazon API Gateway.

## Architecture Overview

Expand Down Expand Up @@ -40,7 +40,7 @@ git config --global credential.helper '!aws codecommit credential-helper $@'
git config --global credential.UseHttpPath true
```

Next you need to create the repository and clone it to your Cloud9 environment:
Next, you need to create the repository and clone it to your Cloud9 environment:
1. Open the [AWS CodeCommit console][codecommit-console]
1. Select **Create Repository**
1. Set the *Repository name** to "wildrydes-site"
Expand All @@ -67,7 +67,7 @@ Now from your Cloud9 development environment:
Once your git repository is created and cloned locally, you'll need to pull in the files for your website and sync them up to the repository.

**:white_check_mark: Step-by-step directions**
From your Cloud9 development environment(or local environment)
From your Cloud9 development environment (or local environment)
1. Change directory into your repository:
```
cd wildrydes-site/
Expand Down Expand Up @@ -95,18 +95,18 @@ From your Cloud9 development environment(or local environment)
```

### Deploy the site with the AWS Amplify Console
Next you'll use the [AWS Amplify Console][amplify-console] to deploy the website you've just commited to git. The Amplify Console takes care of the work of setting up a place to store your static web application code and provides a number of helpful capabilities to simplify both the lifecycle of that application as well as enable best practices.
Next, you'll use the [AWS Amplify Console][amplify-console] to deploy the website you've just commited to git. The Amplify Console takes care of the work of setting up a place to store your static web application code and provides a number of helpful capabilities to simplify both the lifecycle of that application as well as enable best practices.

**:white_check_mark: Step-by-step directions**
1. Launch the [Amplify Console console page][amplify-console-console]
1. Click **Connect App**
1. Select the *Repository service provider* used today and select **Next**
1. If you used GitHub, you'll need to authorize AWS Amplify to your GitHub account
1. From the dropdown select the *Repository* and *Branch* created today
1. From the dropdown, select the *Repository* and *Branch* created today

![Amplify Repository configuration](../images/amplify-console-repository-setup.png)
1. On the "Configure build settings" page leave all the defaults and select **Next**
1. On the "Review" page select **Save and deploy**
1. On the "Configure build settings" page, leave all the defaults and select **Next**
1. On the "Review" page, select **Save and deploy**

The process takes a couple of minutes for Amplify Console to create the neccesary resources and to deploy your code.

Expand All @@ -116,15 +116,15 @@ Once completed, click on the site image to launch your Wild Rydes site.

![Wild Rydes homepage screenshot](../images/wildrydes-homepage.png)

If you click on the link for *Master* you'll see various pieces of information about your website deployment, including sample renderings on various platforms:
If you click on the link for *Master*, you'll see various pieces of information about your website deployment, including sample renderings on various platforms:

![Amplify Client Renderings](../images/amplify-renderings.png)

### Modify the website
The AWS Amplify Console will rebuild and redeploy the app when it detects changes to the connected repository. Make a change to the main page to test out this process.

**:white_check_mark: Step-by-step directions**
1. From your Cloud9 environment open the ```index.html``` file in the root directory of the repository.
1. From your Cloud9 environment, open the ```index.html``` file in the root directory of the repository.
1. Modify the title line:
```
<title>Wild Rydes</title>
Expand Down
16 changes: 8 additions & 8 deletions WebApplication/2_UserManagement/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Module 2: User Authentication and Registration with Amazon Cognito User Pools

In this module you'll create an [Amazon Cognito][cognito] user pool to manage your users' accounts. You'll deploy pages that enable customers to register as a new user, verify their email address, and sign into the site.
In this module, you'll create an [Amazon Cognito][cognito] user pool to manage your users' accounts. You'll deploy pages that enable customers to register as a new user, verify their email address, and sign into the site.

## Architecture Overview

When users visit your website they will first register a new user account. For the purposes of this workshop we'll only require them to provide an email address and password to register. However, you can configure Amazon Cognito to require additional attributes in your own applications.
When users visit your website, they will first register a new user account. For the purposes of this workshop, we'll only require them to provide an email address and password to register. However, you can configure Amazon Cognito to require additional attributes in your own applications.

After users submit their registration, Amazon Cognito will send a confirmation email with a verification code to the address they provided. To confirm their account, users will return to your site and enter their email address and the verification code they received. You can also confirm user accounts using the Amazon Cognito console if you want to use fake email addresses for testing.

Expand All @@ -23,7 +23,7 @@ Each of the following sections provides an implementation overview and detailed,

#### Background

Amazon Cognito provides two different mechanisms for authenticating users. You can use Cognito User Pools to add sign-up and sign-in functionality to your application or use Cognito Identity Pools to authenticate users through social identity providers such as Facebook, Twitter, or Amazon, with SAML identity solutions, or by using your own identity system. For this module you'll use a user pool as the backend for the provided registration and sign-in pages.
Amazon Cognito provides two different mechanisms for authenticating users. You can use Cognito User Pools to add sign-up and sign-in functionality to your application or use Cognito Identity Pools to authenticate users through social identity providers such as Facebook, Twitter, or Amazon, with SAML identity solutions, or by using your own identity system. For this module, you'll use a user pool as the backend for the provided registration and sign-in pages.

Use the Amazon Cognito console to create a new user pool using the default settings. Once your pool is created, note the Pool Id. You'll use this value in a later section.

Expand All @@ -39,7 +39,7 @@ Use the Amazon Cognito console to create a new user pool using the default setti

### 2. Add an App Client to Your User Pool

From the Amazon Cognito console select your user pool and then select the **App clients** section. Add a new app and make sure the Generate client secret option is deselected. Client secrets aren't supported with the JavaScript SDK. If you do create an app with a generated secret, delete it and create a new one with the correct configuration.
From the Amazon Cognito console, select your user pool and then select the **App clients** section. Add a new app and make sure the Generate client secret option is deselected. Client secrets aren't supported with the JavaScript SDK. If you do create an app with a generated secret, delete it and create a new one with the correct configuration.

**:white_check_mark: Step-by-step directions**
1. From the Pool Details page for your user pool, select **App clients** from the **General settings** section in the left navigation bar.
Expand All @@ -55,7 +55,7 @@ From the Amazon Cognito console select your user pool and then select the **App
The [/js/config.js][configjs] file contains settings for the user pool ID, app client ID and Region. Update this file with the settings from the user pool and app you created in the previous steps and commit the file back to your git repository.

**:white_check_mark: Step-by-step directions**
1. On your Cloud9 development environment open `js/config.js`
1. On your Cloud9 development environment, open `js/config.js`
1. Update the `cognito` section with the correct values for the user pool and app you just created.
You can find the value for `userPoolId` on the Pool details page of the Amazon Cognito console after you select the user pool that you created.

Expand Down Expand Up @@ -120,15 +120,15 @@ The [/js/config.js][configjs] file contains settings for the user pool ID, app c

1. After confirming the new user using either the `/verify.html` page or the Cognito console, visit `/signin.html` and log in using the email address and password you entered during the registration step.

1. If successful you should be redirected to `/ride.html`. You should see a notification that the API is not configured.
1. If successful, you should be redirected to `/ride.html`. You should see a notification that the API is not configured.

![Successful login screenshot](../images/successful-login.png)

### :star: Recap

:key: Amazon Cognito provides two different capabilities for managing users, federated identities and user pools. [Amazon Cognito][cognito] user pools can handle almost every aspect about managing users, their login credentials, handling password resets, multifactor authentication and much more!

:wrench: In this module you've used user pools to create a completely hosted and managed user management system that will allow us to authenticate your users and manage their user information. From there you've updated the website to use the user pool and utlized the AWS SDKs to provide a signin form on the site.
:wrench: In this module you've used user pools to create a completely hosted and managed user management system that will allow us to authenticate your users and manage their user information. From there, you've updated the website to use the user pool and utlized the AWS SDKs to provide a signin form on the site.

### Next

Expand All @@ -145,4 +145,4 @@ The [/js/config.js][configjs] file contains settings for the user pool ID, app c
[serverless-backend]: ../3_ServerlessBackend/
[cognito-console]: https://console.aws.amazon.com/cognito/home
[configjs]: ../1_StaticWebHosting/website/js/config.js
[jwt-decoder]: https://jwt.io/
[jwt-decoder]: https://jwt.io/
18 changes: 9 additions & 9 deletions WebApplication/3_ServerlessBackend/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Module 3: Serverless Service Backend

In this module you'll use [AWS Lambda][lambda] and [Amazon DynamoDB][dynamodb] to build a backend process for handling requests from your web application. The browser application that you deployed in the first module allows users to request that a unicorn be sent to a location of their choice. In order to fulfill those requests, the JavaScript running in the browser will need to invoke a service running in the cloud.
In this module, you'll use [AWS Lambda][lambda] and [Amazon DynamoDB][dynamodb] to build a backend process for handling requests from your web application. The browser application that you deployed in the first module allows users to request that a unicorn be sent to a location of their choice. In order to fulfill those requests, the JavaScript running in the browser will need to invoke a service running in the cloud.

You'll implement a Lambda function that will be invoked each time a user requests a unicorn. The function will select a unicorn from the fleet, record the request in a DynamoDB table and then respond to the front-end application with details about the unicorn being dispatched.
You'll implement a Lambda function that will be invoked each time a user requests a unicorn. The function will select a unicorn from the fleet, record the request in a DynamoDB table, and then respond to the front-end application with details about the unicorn being dispatched.

![Serverless backend architecture](../images/serverless-backend-architecture.png)

The function is invoked from the browser using [Amazon API Gateway][api-gw]. You'll implement that connection in the next module. For this module you'll just test your function in isolation.
The function is invoked from the browser using [Amazon API Gateway][api-gw]. You'll implement that connection in the next module. For this module, you'll just test your function in isolation.

## Implementation Instructions

Expand Down Expand Up @@ -55,7 +55,7 @@ Attach the managed policy called `AWSLambdaBasicExecutionRole` to this role to g
Next you need to add permissions to the role so that it can access your DynamoDB table.

**:white_check_mark: Step-by-step directions*
1. While in the IAM Console on the roles page type `WildRydesLambda` into the filter box on the Roles page and choose the role you just created.
1. While in the IAM Console on the roles page, type `WildRydesLambda` into the filter box on the Roles page and choose the role you just created.
1. On the Permissions tab, choose the **Add inline policy** link in the lower right corner to create a new inline policy.
![Inline policies screenshot](../images/inline-policies.png)
1. Select **Choose a service**.
Expand All @@ -74,7 +74,7 @@ Next you need to add permissions to the role so that it can access your DynamoDB

#### Background

AWS Lambda will run your code in response to events such as an HTTP request. In this step you'll build the core function that will process API requests from the web application to dispatch a unicorn. In the next module you'll use Amazon API Gateway to create a RESTful API that will expose an HTTP endpoint that can be invoked from your users' browsers. You'll then connect the Lambda function you create in this step to that API in order to create a fully functional backend for your web application.
AWS Lambda will run your code in response to events such as an HTTP request. In this step, you'll build the core function that will process API requests from the web application to dispatch a unicorn. In the next module, you'll use Amazon API Gateway to create a RESTful API that will expose an HTTP endpoint that can be invoked from your users' browsers. You'll then connect the Lambda function you create in this step to that API in order to create a fully functional backend for your web application.

#### High-Level Instructions

Expand All @@ -99,7 +99,7 @@ Make sure to configure your function to use the `WildRydesLambda` IAM role you c

## Implementation Validation

For this module you will test the function that you built using the AWS Lambda console. In the next module you will add a REST API with API Gateway so you can invoke your function from the browser-based application that you deployed in the first module.
For this module, you will test the function that you built using the AWS Lambda console. In the next module, you will add a REST API with API Gateway so you can invoke your function from the browser-based application that you deployed in the first module.

**:white_check_mark: Step-by-step directions**
1. From the main edit screen for your function, select **Configure test events** from the the **Select a test event...** dropdown.
Expand Down Expand Up @@ -130,7 +130,7 @@ For this module you will test the function that you built using the AWS Lambda c
```
![Configure test event](../images/configure-test-event-2.png)
1. Click **Create**.
1. On the main function edit screen click **Test** with `TestRequestEvent` selected in the dropdown.
1. On the main function edit screen, click **Test** with `TestRequestEvent` selected in the dropdown.
1. Scroll to the top of the page and expand the **Details** section of the **Execution result** section.
1. Verify that the execution succeeded and that the function result looks like the following:
```JSON
Expand All @@ -147,7 +147,7 @@ For this module you will test the function that you built using the AWS Lambda c

:key: [AWS Lambda][lambda] is a serverless functions as a service product that removes the burden of managing servers to run your applications. You configure a trigger and set the role that the function can use and then can interface with almost anything you want from databases, to datastores, to other services eithe publicly on the internet or in your own Amazon Virtual Private Cloud (VPC). [Amazon DynamoDB][dynamodb] is a non-relational serverless database that can scale automatically to handle massive amounts of traffic and data without you need manage any servers.

:wrench: In this module you've created a DynamoDB table and then a Lambda function to write data into it. This function will be put behind an Amazon API Gateway in the next module which will in turn be connected to your web application to capture the ride details from your users.
:wrench: In this module, you've created a DynamoDB table and then a Lambda function to write data into it. This function will be put behind an Amazon API Gateway in the next module which will in turn be connected to your web application to capture the ride details from your users.

### Next

Expand All @@ -163,4 +163,4 @@ For this module you will test the function that you built using the AWS Lambda c
[restful-apis]: ../4_RESTfulAPIs/
[dynamodb-console]: https://console.aws.amazon.com/dynamodb/home
[iam-console]: https://console.aws.amazon.com/iam/home
[lambda-console]: https://console.aws.amazon.com/lambda/home
[lambda-console]: https://console.aws.amazon.com/lambda/home
Loading