Show / Hide Table of Contents

LambdaUsage Event

The LambdaUsage event is emitted by LambdaSharp.Core when ingesting a Lambda invocation report from the associated the CloudWatch logs. Note that Core Services must be enabled for these events to be emitted.

Event Schema

Type: String # UsageReport
Version: String # 2020-05-05
ModuleInfo: String
FunctionId: String
ModuleId: String
Module: String
Function: String
BilledDuration: Float
UsedDuration: Float
UsedDurationPercent: Float
MaxDuration: Float
MaxMemory: Int
UsedMemory: Int
UsedMemoryPercent: Float
InitDuration: Float?

Event Properties

Type

The Type property holds the event type name. This property is always set to "LambdaUsage".

Type: String

Version

The Version property holds the event type version. This property is set to "2020-05-05".

Type: String

ModuleInfo

The ModuleInfo property holds the module full name, version, and origin.

Type: String

FunctionId

The FunctionId property holds the resource name of the Lambda function.

Type: String

ModuleId

The ModuleId property holds the CloudFormation stack ID.

Type: String

Module

The Module property holds the module full name.

Type: String

Function

The Function property holds the logical function name as defined by the module.

Type: String

BilledDuration

The BilledDuration property holds the number of milliseconds the AWS account will be billed for this Lambda function invocation.

Type: Float

UsedDuration

The UsedDuration property holds the execution time for the Lambda function invocation in milliseconds. The invocation time does not include the cold start duration, which is tracked independently by the InitDuration property.

Type: Float

UsedDurationPercent

The UsedDurationPercent property holds the execution time for the Lambda function invocation normalized to the maximum allowed duration. The value is always between 0.0 and 1.0.

Type: Float

MaxDuration

The MaxDuration property holds the maximum execution time allowed for a Lambda function invocation. This execution limit does not include the cold start duration.

Type: Float

MaxMemory

The MaxMemory property holds the maximum amount of memory usable by the Lambda function in MB.

Type: Int

UsedMemory

The UsedMemory property holds the used amount of memory during the Lambda function invocation in MB.

Type: Int

UsedMemoryPercent

The UsedMemoryPercent property holds the used memory amount the Lambda function invocation normalized to the maximum allowed amount. The value is always between 0.0 and 1.0.

Type: Float

InitDuration

The InitDuration property holds the startup time required by a Lambda function in milliseconds. This property is only set for a Lambda function that required a cold start, otherwise the property is null.

Type: Float or null

Event Sample

{
  "ModuleInfo": "LambdaSharp.Twitter.Query:0.7.1.0",
  "FunctionId": "Sandbox-Demo-TwitterNotifier-Twitte-QueryFunction-13VL7ZV8BTWKN",
  "ModuleId": "Sandbox-Demo-TwitterNotifier-TwitterNotify-1F8924TBHKNJ9",
  "Module": "LambdaSharp.Twitter.Query",
  "Function": "QueryFunction",
  "BilledDuration": 12.5,
  "UsedDuration": 12.46635,
  "UsedDurationPercent": 0.415545,
  "MaxDuration": 30.0,
  "MaxMemory": 256,
  "UsedMemory": 109,
  "UsedMemoryPercent": 0.42578125,
  "InitDuration": 0.43456,
  "Type": "LambdaUsage",
  "Version": "2020-05-05"
}
In This Article
Back to top Generated by DocFX