Skip to content

Latest commit

 

History

History
83 lines (69 loc) · 7.52 KB

README.md

File metadata and controls

83 lines (69 loc) · 7.52 KB

Serverless E2E

Index:

  1. Webapp:
    1. Hosting (S3): where to store app assets?
      1. 1.1.1: create S3 Bucket as web hosting to store webapp description ts py docs
      2. 1.1.2: add command to update web assets in S3 posh bash docs
    2. CDN (CloudFront): How to distribute assets across the globe?
      1. 1.2.1: create CloudFront distribution ts py docs
      2. 1.2.2: add command to invalidate cloudfront distribution posh bash docs
    3. DNS (Route53): how to set up DNS? -- optional
      1. [o] create CDK record set (optional, we may not have access to a domain)
  2. REST API:
    1. handlers
      1. 2.1.1: create lambdas for getOrders ts py docs
      2. 2.1.2: create lambdas for createOrder ts py docs
      3. 2.1.3: create lambdas for updateOrder ts py docs
    2. API (CDK):
      1. 2.2.1: create api ts py docs
      2. 2.2.2: create /orders resource [POST, GET] ts py docs
      3. 2.2.3: create /orders/{customer}/{id} ts py docs
    3. webapp
      1. 2.3.1: get orders from api js docs
      2. 2.3.2: send the order to the api js docs
  3. Database:
    1. DynamoDB:
      1. 3.1.1: create DynamoDB orders table ts py docs
      2. 3.1.2: connect api to dynamodb ts py docs
    2. handlers:
      1. 3.2.1: use table on getOrders - get all orders from dynamodb js docs
      2. 3.3.2: use table on createOrder - save order on dynamodb table js docs
      3. 3.2.3: use table on updateOrder - patch an order on dynamodb table js docs
  4. Backend processes:
    1. app integration:
      1. 4.1.1: create processing orders queue ts py docs
      2. 4.1.2: create user notification topic (sns) ts py docs
    2. Handlers
      1. 4.2.1: create a lambda to handle dynamodb stream ts py docs
      2. 4.2.2: create a lambda to handle sqs messages ts py docs
    3. assign handlers:
      1. 4.3.1: set lambda 4.2.1 as handler for dynamodb table updates ts py docs
      2. 4.3.2: set lambda 4.2.2 as handler for sqs queue messages ts py docs
  5. Security:
    1. Web App Access Control (Custom auth): How to secure app?
      1. create authenticate lambda function
      2. create an endpoint for authentication
    2. API Access Control (Custon authorizer):
      1. create the custom authorizer
      2. add authorizer to private endpoints
    3. webapp authorization
      1. use Authorization header on http getOrders
      2. use Authorization header on http createOrder
    4. Permission Boundaries
      1. define Policy Boundary
      2. attach boundary to all constructs

Chapter breakdown

1 Webapp

Our goal is to deploy a basic single page application to the web, we want to make it avaiable across multiple edge locations so customer will have a fast and reliable experience

1-1 Hosting

For hosting we will be using an S3 bucket wich a cost efective and reliable object store.

1-1-1

Using the CDK create an s3 bucket inside the webapp stack file in either TypeScripr or Python

1-1-2

Using AWS CLI call the command to upload all the relevant files to the S3 bucket you created on the previous step

1-2 CDN

We will set up a Content Delivery Network to distribute static files (webapp) close to the final customer. For this task we will be leveraging CloudFront

1-2-1

1-2-2