March 2, 2019

Serverless Series - Building a Serverless WebApp

 Serverless Series HomeAs part of the Serverless WebApp Demo, we will be building 2 use cases and 1 for DIY. All of these use cases will involve Amazon API Gateway, Amazon S3, Amazon CloudWatch & AWS Lambda. Familiarise yourself a bit about these services before you dive into the below sessions. Source code for the Serverless WebApp can be found on Github.

High-level steps to setup Serverless WebApplication using API Gateway & Lambda

  1. Create LambdaFunction with content from BasicLambda.py code, create a new role with `Simple Micro Services` permission and add API Gateway Trigger
  2. Create & Configure API Gateway GET Method to invoke BasicLambda.py
  3. Create S3 Bucket, make its objects public, convert it to a static website.
  4. upload error.html & index.html to S3 bucket created in #3, make these objects public
  5. Launch the S3 Static Website URL to see the web application is working
  6. Copy StopRunningInstances.py code to replace existing Lambda Function
  7. Add `AmazonEC2FullAccess` Lambda Execute Role created in #1
  8. Create one or more EC2 instances with tag name `AutoOff` with the value `yes` (case sensitive)
  9. Launch the S3 Static Website URL to test the running EC2 instances with the tag AutoOff=yes are shutdown.


MindMap covering Use Case 1 & Use Case 2 - View this for before proceeding..

Serverless WebApp Build - Use Case 1
Serverless WebApp Build - Use Case 2
Serverless WebApp Build - Use Case 3 - DIY

No comments:

Post a Comment