Aws - Lambda Function

Card Puncher Data Processing


AWS Lambda run code in response to events such as an HTTP request.

A lambda function (Serverless code) can defined using AWS SAM.

Every Lambda function has an IAM role associated with it. This role defines what other AWS services the function is allowed to interact with.

AWS Lambda automatically monitors Lambda functions and reports metrics through Amazon CloudWatch. To help you monitor your code as it executes, Lambda automatically tracks the number of requests, the latency per request, and the number of requests resulting in an error and publishes the associated metrics. (Select Monitoring to view the log).

You can leverage these metrics to set custom alarms with Amazon CloudWatch

The Monitoring tab will show six CloudWatch metrics:

  • Invocation count,
  • Invocation duration,
  • Invocation errors,
  • Throttled invocations,
  • Iterator age,
  • and DLQ errors.

Use in AWS

Lambda is integrated with:


amplify function invoke <resourcename>

See also: Testing and Debugging Serverless Applications

Invoke locally

With the AWS SAM CLI, you can invoke Lambda functions locally.


See Aws - Step (Serverless Worklfow)


Handle Error


Documentation / Reference

Discover More
Card Puncher Data Processing
AWS - Api Gateway

With Amazon API Gateway, you can create a RESTful API that will expose an HTTP endpoint that can be invoked from your users' browsers. You'll then connect the Lambda function to this endpoint
Aws Serverless Web App
AWS - Serverless Web Application

Note the AWS tuto Amazon tuto - Build a Serverless Web Application that create a serverless...
Aws User Click Event Processing Architecture
Aws - Click Event Rest API (Capture user behavior)

Adapted from the Aws tutorial - Building a Modern app (module 5). Click Event records will be processed in real-time by a serverless code function, aggregated, and stored for any future analysis that...
Aws User Click Event Processing Architecture
Aws - Kinesis Data Firehose Delivery Stream

Amazon Kinesis Data Firehose is a simple service for delivering real-time streaming data to destinations. It is part of the Kinesis streaming data platform Delivery streams load data, automatically and...
Card Puncher Data Processing
Aws - Serverless Application Model (Sam)

The AWS Serverless Application Model (AWS SAM) is an open-source framework that you can use to build serverless applications on AWS. With the AWS SAM CLI, you can invoke Lambda functions locally,...
Card Puncher Data Processing
Aws - Step (Serverless Worklfow)

With AWS Step Functions, you can design and run a serverless workflow that coordinates multiple AWS Lambda functions. how...

Share this page:
Follow us:
Task Runner