Serverless and Lambda

AWS Cloud Development Kit (AWS CDK)
Share this page:

If you’ve just landed here, we’re doing a “Become a Cloud Architect” Unicorn Workshop by building a Unicorn Pursuit Web App step by step, and you’re more then welcome to join!

About Serverless

Basically, the evolution started from Data Center, and then evolved into:

  • IaaS
  • PaaS
  • Containers
  • Serverless!!! Hello Lambdas!

Why is Serverless so popular?

  • No servers or databases to operate.
  • So much cheaper.
  • Super elastic / scalable.

Lambda

Fully managed compute platform, where we can run our Code without managing Servers. Lambda is EVENT driven, and charged based on how long your code runs.

Cool: First MILLION requests are FREE, and 0.2 dollars per million requests starting from there.

You can run Lambda:

  • As RESPONSE to EVENTS that trigger the execution. A trigger can be a change to S3 or DynamoDB data.
  • As compute service to run your code as response to HTTP requests, using API Gateway, or API calls using AWS SDK.

Important:

  • Lambda scales OUT.
  • Lambdas can trigger other Lambdas.
  • X-Ray is used to DEBUG Lambda. You can use Lambda across Regions.

Step Functions

  • Great way to visualize a serverless app
  • Automatically triggers and tracks each step
  • Logs each step, for later troubleshooting

X-Ray

Collects data about requests your app serves. You can see detail info about everything your app is calling from other services.

X-Ray SDK provides:

  • Inceptors, to add to your code
  • Client Handlers, to instrument AWS SDK clients your app uses to call other AWS services.
  • An HTTP client to use for other calls to internal and external HTTP services.

Code

Deep Dive

Where to find more info




Last modified May 5, 2020: cognito doc done (37d2ee1)