AWS Serverless Stacks

Here is a simple LazyStack AWS Serverless stack using .NETCore

The diagram elements above are color coded to help illustrate what assets are provided by you "programmer", "generated by LazyStack", "a LazyStack support library", or "provided by AWS".

  • Serverless.template SAM specification – a single document defining your AWS application stack
  • Application Client Code
    • AwsSettings.json - embedded resource with AWS Stack connection settings
    • LazyStackAuth -- authentication library
      • AWSSDK -- Amazon library for calling AWS Services like Cognito
    • Schema -- generated library containing data types transferred through REST interface
    • ClientSDK -- generated library for calling AWS Stack endpoints
  • Lambda Projects – C# Projects that implement your Lambda Functions
  • AWS Application Stack Resources
    • API Gateway – provides a REST interface to client applications like mobile apps
    • Lambda Functions – services called by the API Gateway to perform requested actions
    • Cognito – User Sign-Up, Sign-In, Manage Identity information, Sync Identity information across devices
    • DynamoDB – NoSQL Database (provides encryption at rest)
    • Identity Access Manage (IAM) - policy based authorization for access to AWS Resources
    • Secrets Manager – secure storage of secrets (passwords etc.)
    • Security Token Service – issues temporary credentials for authenticated users
    • CloudWatch – logging etc.
  • AWS CloudFormation – create/update/delete AWS application stacks based on your serverless.template SAM specification file

The benefit of a serverless stack is that there is very little traditional “DevOps” required to create and update these stacks. In addition, the serverless stack components auto-scale from zero resource-usage to large resource-usage automatically so your application can grow without pain. The best part is the cost of your application stack, in “idle state”, is near-zero. You only pay for what you use and since all these services (except Secrets Manager) are part of the AWS free-tier, a substantial amount of application stack usage is free.

Even though there is much less “DevOps” required to use Serverless Stacks on AWS, you still need to configure all the AWS resources used in your Stack. AWS makes this easier with their Serverless Application Model (SAM) language.

This is all pretty simple if you are building a “demoware” application stack with a simple REST API and no security. Things get a lot more complex as you move from “demoware” to a “full” application stack with a robust REST API, multiple lambda functions, full security and substantial application development support.

LazyStack bridges the gap between the “demoware” and a “full” application stacks by automating much of the work involved and providing reasonable default implementations for secure AWS resource definitions in your application stack and providing application development support features like local debugging and extensible code frameworks for server and client-side libraries.