The LambdaSharp.App.EventBus module is used by the
App declaration to create an API Gateway WebSocket proxy for CloudWatch EventBridge. The proxy is only created if the app has at least one event source. When created, the proxy manages event pattern subscriptions to forwarded events. The proxy uses the same notation as CloudWatch EventBridge to describe event patterns. This design promotes a unified way to work with CloudWatch events both in the backend and frontend. Access to the EventBus API is secured by an API key that is computed from the CloudFormation stack identifier and the app version identifier. Using the
DevMode parameter, the EventBus API can be configured for more lenient access and a simplified API key, which allows for accessing it from localhost.
This module defines no resource types.
AppVersionIdparameter specifies the app version identifier. This value is used to construct the complete API key.
DevModeparameter specifies if the app EventBus API should run with relaxed API key constraints and enables debug logging. The value must be one of
Disabled. Default value is
DevModeparameter must have one of the following values:
The API key is solely based on the CloudFormation stack identifer. Debug logging is enabled in the app.
The API key is based on teh CloudFormation stack identifier and the app version identifier. Debug logging is disabled in the app.
ApiKeyoutput contains the CloudFormation stack identifier portion of the API key.
Urloutput contains the URL of the api endpoint used by the