Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 56738b9

Browse files
committed
add new Setup instructions and update main README to align with other workshops
1 parent c4f9446 commit 56738b9

File tree

2 files changed

+136
-31
lines changed

2 files changed

+136
-31
lines changed

WebApplication/0_Setup/README.md

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
## Setup
2+
3+
### AWS Account
4+
5+
In order to complete this workshop, you'll need an AWS account and access to
6+
create AWS Identity and Access Management (IAM), Amazon Cognito, AWS Lambda,
7+
Amazon S3, Amazon API Gateway, AWS Amplify Console, Amazon DynamoDB, and AWS
8+
Cloud9 resources within that account.
9+
10+
The code and instructions in this workshop assume only one participant is using
11+
a given AWS account at a time. If you attempt sharing an account with another
12+
participant, you will encounter naming conflicts for certain resources. You can
13+
work around this by either using a suffix in your resource names or using
14+
distinct Regions, but the instructions do not provide details on the changes
15+
required to make this work.
16+
17+
Use a personal account or create a new AWS account for this workshop rather than
18+
using an organization's account to ensure you have full access to the necessary
19+
services and to ensure you do not leave behind any resources from the workshop.
20+
21+
### AWS Cloud9 IDE
22+
23+
AWS Cloud9 is a cloud-based integrated development environment (IDE) that lets
24+
you write, run, and debug your code with just a browser. It includes a code
25+
editor, debugger, and terminal. Cloud9 comes pre-packaged with essential tools
26+
for popular programming languages and the AWS Command Line Interface (CLI)
27+
pre-installed so you don’t need to install files or configure your laptop for
28+
this workshop. Your Cloud9 environment will have access to the same AWS
29+
resources as the user with which you logged into the AWS Management Console.
30+
31+
Take a moment now and setup your Cloud9 development environment.
32+
33+
**:white_check_mark: Step-by-step Instructions**
34+
35+
1. Go to the AWS Management Console, click **Services** then select **Cloud9**
36+
under Developer Tools.
37+
38+
1. Click **Create environment**.
39+
40+
1. Enter `Development` into **Name** and optionally provide a **Description**.
41+
42+
1. Click **Next step**.
43+
44+
1. You may leave **Environment settings** at their defaults of launching a new
45+
**t2.micro** EC2 instance which will be paused after **30 minutes** of
46+
inactivity.
47+
48+
1. Click **Next step**.
49+
50+
1. Review the environment settings and click **Create environment**. It will
51+
take several minutes for your environment to be provisioned and prepared.
52+
53+
1. Once ready, your IDE will open to a welcome screen. Below that, you should
54+
see a terminal prompt.
55+
56+
You can run AWS CLI commands in here just like you would on your local computer.
57+
Verify that your user is logged in by running `aws sts get-caller-identity`.
58+
59+
```console
60+
aws sts get-caller-identity
61+
```
62+
63+
You'll see output indicating your account and user information:
64+
65+
```console
66+
ec2-user:~/environment $ aws sts get-caller-identity
67+
```
68+
```json
69+
{
70+
"Account": "123456789012",
71+
"UserId": "AKIAI44QH8DHBEXAMPLE",
72+
"Arn": "arn:aws:iam::123456789012:user/Alice"
73+
}
74+
```
75+
76+
Keep your AWS Cloud9 IDE opened in a tab throughout this workshop.
77+
78+
### :star: Tips
79+
80+
:bulb: Keep an open scratch pad in Cloud9 or a text editor on your local computer
81+
for notes. When the step-by-step directions tell you to note something such as
82+
an ID or Amazon Resource Name (ARN), copy and paste that into the scratch pad.
83+
84+
### :star: Recap
85+
86+
:key: Use a unique personal or development [AWS account](#aws-account)
87+
88+
:key: Keep your [AWS Cloud9 IDE](#aws-cloud9-ide) opened in a tab
89+
90+
### Next
91+
92+
:white_check_mark: Proceed to the first module, [Static Web Hosting]
93+
[static-web-hosting], wherein you'll deploy a static web site via AWS Amplify Console.
94+
95+
[region-table]: https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services/
96+
[static-web-hosting]: ../1_StaticWebHosting/

WebApplication/README.md

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,47 @@
1-
# Serverless Web Application Workshop
1+
## Serverless Web Application Workshop
22

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.
44

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.
66

77
See the diagram below for a depiction of the complete architecture.
88

99
![Wild Rydes Web Application Architecture](images/wildrydes-complete-architecture.png)
1010

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

Comments
 (0)