Show / Hide Table of Contents

CloudWatch Event Source

See Blazor Event sample for an example of how to use the CloudWatch Event source with a LambdaSharp app.

Syntax

EventBus: String|Expression
Pattern: JSON

Properties

EventBus

The EventBus attribute specifies which event bus to listen to.

Required: Yes

Type: String or Expression

Pattern

The Pattern attribute describes which events are published to the LambdaSharp App EventBus. For more information, see Events and Event Patterns in EventBridge in the Amazon EventBridge User Guide.

For better consistency with the SDK, the attributes can be capitalized and will be converted by the tool automatically. For example, DetailType becomes detail-type, Source becomes source, and so on. Note the renaming is only applied to top-level attributes.

NOTE: The Resources attribute defaults to !Sub "lambdasharp:tier:${Deployment::Tier}" when omitted. Use Resources: null to have no constraints on the resources attribute.

Required: Yes

Type: JSON

Examples

Receive Events from Deployment Tier

The following definition forwards events from Sample.Event of type MyEvent, but only when sent from the same deployment tier.

Sources:
  - EventBus: default
    Pattern:
      Source:
        - Sample.Event
      DetailType:
        - MyEvent
      Resources:
        - !Sub "lambdasharp:tier:${Deployment::Tier}"
In This Article
Back to top Generated by DocFX