Serverless Cheat Sheet

Why Serverless?

  • Evolution of computing
    • Server → Virtual Machines → Containers
      • Cost control, maximizing utilization of resource by having a better granularity
      • Ease of operation, VMs and containers are software-based so could be automated easily
    • Data Center → Cloud → Managed → Serverless
      • Scalability, to support rapid growth of business in time
      • Shift of focus, companies should invest more resources on serving customers, not worrying about IT infrastructure and operation
      • Cost control, on-demand or pay-per-use means no need to predict and provision, cost follows actual business volume closely
      • Ease of operation, no physical servers and data centers, limited software operations, completely no server to manage
  • Serverless pros
    • Pay only for what you use, not for the idle time
    • No servers, no software operations, user only focuses on most basic parameters, code and architecture
    • User automatically gain good security, auto scaling, monitoring, logging
  • Serverless cons
    • Requires learning and adopting a new paradigm that is still developing
      • Development and deployment
      • Architecture patterns
      • Best practices
    • When business is highly stable, the cost of serverless services may be higher than other implementations
    • Tight coupling with vendors

Implications of Serverless

  • Serverless promotes new way of thinking about IT resources
    • Almost zero start cost, so starting a project, a startup, an innovation project is a no-brainer, no approval or internal process needed
    • Not need to pay for idle resources, so a service could be built, and put there without cost
    • Instant service resurrection, although you are not paying for idle resources, when there are new requests coming in, they will be served timely
  • Serverless was created based on the hypothesis
    • Companies need to innovate quickly
    • Innovations are highly unpredictable and volatile
    • …if these do not hold then serverless is not valuable

AWS Serverless Services

  • Serverless Compute
    • Lambda
      • Pay by per 100ms of execution time + very low per request cost
  • Serverless API Gateway
  • Serverless Message Queue
    • SQS
      • Pay by request
  • Serverless NoSQL Database
    • NOTE: Databases will store data, and by the definition of persistent storage it cannot be fully serverless. User will need to pay for the storage as long as it is used.
    • DynamoDB
      • Pay by request + storage
    • Aurora Serverless
  • Serverless Notification
    • SNS
  • Serverless Log Collection
    • NOTE: Similar to databases, logging services will store logs and incur storage cost. Also note we see a blurred line of Serverless and SaaS in the case of log collection.
    • CloudWatch Logs
  • Serverless Event Bus
    • EventBridge
  • Serverless Tools
    • Serverless Application Model (SAM)