Operational Events
LambdaSharp modules can emit operational CloudWatch events on the default Amazon EventBridge when Core Services are enabled. These events correspond to runtime errors, function usage, as well as custom CloudWatch metrics.
Overview
The operational events are only emitted when Core Services is enabled, because they are generated by the Lambdasharp.Core module when ingesting the CloudWatch logs from the Lambda functions.
The following operational events are emitted:
- LambdaError Event when an error or warning is reported by a Lambda function either by the Lambda code itself or by the Lambda runtime.
- LambdaMetrics Event when the Lambda function emits a custom CloudWatch metrics record.
- LambdaUsage Event when a Lambda function has completed its execution.
Schema
The LambdaSharp events follow the CloudWatch Events schema with additional values filled in to allow subscribing by stack name, module full name, deployment tier, module specifier (moduleinfo
), and module origin.
source: LambdaSharp
detail-type: $EVENT_TYPE
detail: JSON # event type specific
resources:
- lambdasharp:stack:$MODULE_ID
- lambdasharp:module:$MODULE_FULL_NAME
- lambdasharp:tier:$DEPLOYMENT_TIER
- lambdasharp:moduleinfo:$MODULE_INFO
- lambdasharp:origin:$MODULE_ORIGIN
Variable | Description |
---|---|
$DEPLOYMENT_TIER |
The name of the deployment tier. Empty value for the default deployment tier. |
$EVENT_TYPE |
The event type emitted. One of LambdaError , LambdaMetrics , or LambdaUsage . |
$MODULE_FULL_NAME |
Full name of the originating module (e.g. My.Module ). |
$MODULE_ID |
The name of the CloudFormation stack that was created for the module deployment. |
$MODULE_INFO |
The full name, version, and origin of the originating module (e.g. My.Module:1.5@my-origin ) |
$MODULE_ORIGIN |
Origin of the originating module (e.g. my-origin ). |