INNER CODE UNIT · Python
__init__
aws-samples/serverless-patterns · adobe-eventbridge-lambda/app.py:23
def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
#stack inputs
ADOBE_PARTNER_EVENT_BUS = CfnParameter(self, id="adobeEventBusName", type="String",
description="The name of event bus the Adobe Partner EventSource is associated with.")
#turn partner event bus from string to EventBus object
partner_event_bus = events.EventBus.from_event_bus_name(scope=self, id='partner-event-bus', event_bus_name=ADOBE_PARTNER_EVENT_BUS.value_as_string)
# CloudWatch Logs Group that stores all events sent by Adobe for debugging or archive
log_group = logs.LogGroup(
self, "Adobe-all-events",
retention=logs.RetentionDays.ONE_DAY,
removal_policy=RemovalPolicy.DESTROY
)
# CloudWatch Logs Group that stores specific events from Adobe for debugging or archive