awslabs/lambda-refarch-webapp

Name: lambda-refarch-webapp

Owner: Amazon Web Services - Labs

Owner: AWS Samples

Description: Serverless Reference Architecture for creating a Web Application

Created: 2015-09-27 09:39:29.0

Updated: 2018-01-12 08:49:13.0

Pushed: 2017-07-24 20:52:13.0

Homepage:

Size: 1674

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Serverless Reference Architecture: Web Application

Note: The Vote Application serverless reference architecture was originally in the lambda-refarch-webapp repository and has since moved to the lambda-refarch-voteapp repository.

The Serverless Web Application (diagram) demonstrates how to use AWS Lambda in conjunction with Amazon API Gateway, Amazon DynamoDB, Amazon S3, and Amazon Cognito to build a serverless web application.

The site is a simple blog application that allows users to log in and create posts and comments. By leveraging these services, you can build cost-efficient web applications that don't require the overhead of managing servers.

This repository contains sample code for all the Lambda functions that make up the back end of the application, as well as an AWS CloudFormation template for creating the functions, API, DynamoDB tables, Amazon Cognito identity pool, and related resources.

Running the example

The entire example system can be deployed in us-east-1 using the provided CloudFormation template and an S3 bucket.

Choose Launch Stack to launch the template in the us-east-1 region in your account:

Launch Serverless Web Application into North Virginia with CloudFormation

After the stack is successfully created, you need to finish the configuration.

Testing the example

After you've successfully uploaded the updated website to S3, go to the URL for the website. You can find this URL listed in the outputs for the CloudFormation stack you ran earlier, listed as WebsiteURL. At this point, your website is up and running. Feel free to interact with it, create posts, comments, etc.

Cleaning up the example resources

To remove all resources created by this example, do the following:

  1. Delete all objects from the Hosting Bucket created by the CloudFormation stack.
  2. Delete the CloudFormation stack.
  3. Delete all CloudWatch log groups for each of the Lambda functions in the stack.
  4. Delete the Amazon Cognito identity pool.
CloudFormation template resources

The following sections explain all of the resources created by the CloudFormation template provided with this example.

Website
Lambda functions
Function roles
API Gateway resources
DynamoDB tables
Amazon Cognito
Other resources
Configuration
Outputs
License

This reference architecture sample is licensed under Apache 2.0.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.