|
1 |
| -# Serverless Web Application Workshop |
| 1 | +## Serverless Web Application Workshop |
2 | 2 |
|
3 |
| -In this workshop you'll deploy a simple web application that enables users to request unicorn rides from the [Wild Rydes](http://www.wildrydes.com/) fleet. The application will present users with an HTML based user interface for indicating the location where they would like to be picked up and will interface on the backend with a RESTful web service to submit the request and dispatch a nearby unicorn. The application will also provide facilities for users to register with the service and log in before requesting rides. |
| 3 | +In this workshop you'll deploy a simple web application that enables users to request unicorn rides from the [Wild Rydes][wildrydes] fleet. The application will present users with an HTML based user interface for indicating the location where they would like to be picked up and will interface on the backend with a RESTful web service to submit the request and dispatch a nearby unicorn. The application will also provide facilities for users to register with the service and log in before requesting rides. |
4 | 4 |
|
5 |
| -The application architecture uses [AWS Lambda](https://aws.amazon.com/lambda/), [Amazon API Gateway](https://aws.amazon.com/api-gateway/), [Amazon S3](https://aws.amazon.com/s3/), [Amazon DynamoDB](https://aws.amazon.com/dynamodb/), and [Amazon Cognito](https://aws.amazon.com/cognito/). S3 hosts static web resources including HTML, CSS, JavaScript, and image files which are loaded in the user's browser. JavaScript executed in the browser sends and receives data from a public backend API built using Lambda and API Gateway. Amazon Cognito provides user management and authentication functions to secure the backend API. Finally, DynamoDB provides a persistence layer where data can be stored by the API's Lambda function. |
| 5 | +The application architecture uses [AWS Lambda][lambda], [Amazon API Gateway][api-gw], [Amazon S3][s3], [Amazon DynamoDB][dynamodb], [Amazon Cognito][cognito], and [AWS Amplify Console][amplify-console]. Amplify Console hosts static web resources including HTML, CSS, JavaScript, and image files which are loaded in the user's browser via S3. JavaScript executed in the browser sends and receives data from a public backend API built using Lambda and API Gateway. Amazon Cognito provides user management and authentication functions to secure the backend API. Finally, DynamoDB provides a persistence layer where data can be stored by the API's Lambda function. |
6 | 6 |
|
7 | 7 | See the diagram below for a depiction of the complete architecture.
|
8 | 8 |
|
9 | 9 | 
|
10 | 10 |
|
11 |
| -If you'd like to jump in and get started please visit the [Static Web hosting](1_StaticWebHosting) module page to begin the workshop. |
12 |
| - |
13 |
| -## Prerequisites |
14 |
| - |
15 |
| -### AWS Account |
16 |
| - |
17 |
| -In order to complete this workshop you'll need an AWS Account with access to create AWS IAM, S3, DynamoDB, Lambda, API Gateway and Cognito resources. The code and instructions in this workshop assume only one student is using a given AWS account at a time. If you try sharing an account with another student, you'll run into naming conflicts for certain resources. You can work around these by appending a unique suffix to the resources that fail to create due to conflicts, but the instructions do not provide details on the changes required to make this work. |
18 |
| - |
19 |
| -All of the resources you will launch as part of this workshop are eligible for the AWS free tier if your account is less than 12 months old. See the [AWS Free Tier page](https://aws.amazon.com/free/) for more details. |
20 |
| - |
21 |
| -### Browser |
22 |
| - |
23 |
| -We recommend you use the latest version of Chrome to complete this workshop. |
24 |
| - |
25 |
| -### Text Editor |
26 |
| - |
27 |
| -You will need a local text editor for making minor updates to configuration files. |
28 |
| - |
29 |
| -## Modules |
30 |
| - |
31 |
| -This workshop is broken up into multiple modules. You must complete each module before proceeding to the next, however, modules 1 and 2 have AWS CloudFormation templates available that you can use to launch the necessary resources without manually creating them yourself if you'd like to skip ahead. |
32 |
| - |
33 |
| -1. [Static Web hosting](1_StaticWebHosting) |
34 |
| -2. [User Management](2_UserManagement) |
35 |
| -3. [Serverless Backend](3_ServerlessBackend) |
36 |
| -4. [RESTful APIs](4_RESTfulAPIs) |
37 |
| - |
38 |
| -After you have completed the workshop you can delete all of the resources that were created by following the [cleanup guide](9_CleanUp). |
| 11 | +### Modules |
| 12 | + |
| 13 | +This workshop is divided into four modules. Each module describes a scenario of |
| 14 | +what we're going to build and step-by-step directions to help you implement the |
| 15 | +architecture and verify your work. |
| 16 | + |
| 17 | +| Module | Description | |
| 18 | +| ---------------- | -------------------------------------------------------- | |
| 19 | +| [Static Web hosting][static-web-hosting] | Deploy the static website using AWS Amplify Console by first creating a git repository (in either CodeCommit or GitHub) and then pushing the site code. | |
| 20 | +| [User Management][user-management] | Configure user management for the website using Amazon Cognito. | |
| 21 | +| [Serverless Backend][serverless-backend] | Create an AWS Lambda function that will persist data to an Amazon DynamoDB table. | |
| 22 | +| [RESTful APIs][restful-apis] | Expose the Lambda function via an Amazon API Gateway as a RESTful API that the static site can call. | |
| 23 | + |
| 24 | +:warning: These modules are intended to be executed linearly. |
| 25 | + |
| 26 | +After you have completed the workshop you can delete all of the resources that were created by following the [cleanup guide][cleanup]. |
| 27 | + |
| 28 | +### Next |
| 29 | + |
| 30 | +:white_check_mark: Review and follow the directions in the [setup guide][setup], |
| 31 | +wherein you'll configure your AWS Cloud9 IDE and setup pre-requisites like an |
| 32 | +AWS Account. |
| 33 | + |
| 34 | +[wildrydes]: http://wildrydes.com/ |
| 35 | +[unicorns]: http://www.wildrydes.com/unicorns.html |
| 36 | +[amplify-console]: https://aws.amazon.com/amplify/console/ |
| 37 | +[cognito]: https://aws.amazon.com/cognito/ |
| 38 | +[lambda]: https://aws.amazon.com/lambda/ |
| 39 | +[api-gw]: https://aws.amazon.com/api-gateway/ |
| 40 | +[s3]: https://aws.amazon.com/s3/ |
| 41 | +[dynamodb]: https://aws.amazon.com/dynamodb/ |
| 42 | +[setup]: 0_Setup/ |
| 43 | +[static-web-hosting]: 1_StaticWebHosting/ |
| 44 | +[user-management]: 2_UserManagement/ |
| 45 | +[serverless-backend]: 3_ServerlessBackend/ |
| 46 | +[restful-apis]: 4_RESTfulAPIs/ |
| 47 | +[cleanup]: 9_CleanUp/ |
0 commit comments