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
Typeproperty holds the event type name. This property is always set to"LambdaUsage".Type: String
Version-
The
Versionproperty holds the event type version. This property is set to"2020-05-05".Type: String
ModuleInfo-
The
ModuleInfoproperty holds the module full name, version, and origin.Type: String
FunctionId-
The
FunctionIdproperty holds the resource name of the Lambda function.Type: String
ModuleId-
The
ModuleIdproperty holds the CloudFormation stack ID.Type: String
Module-
The
Moduleproperty holds the module full name.Type: String
Function-
The
Functionproperty holds the logical function name as defined by the module.Type: String
BilledDuration-
The
BilledDurationproperty holds the number of milliseconds the AWS account will be billed for this Lambda function invocation.Type: Float
UsedDuration-
The
UsedDurationproperty 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 theInitDurationproperty.Type: Float
UsedDurationPercent-
The
UsedDurationPercentproperty 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
MaxDurationproperty 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
MaxMemoryproperty holds the maximum amount of memory usable by the Lambda function in MB.Type: Int
UsedMemory-
The
UsedMemoryproperty holds the used amount of memory during the Lambda function invocation in MB.Type: Int
UsedMemoryPercent-
The
UsedMemoryPercentproperty 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
InitDurationproperty 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 isnull.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"
}