-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtemplate.yaml
48 lines (42 loc) · 1.27 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
AnyCompany Amazon EventBridge event bus
EventBus declaration for the AnyCompany sample SaaS application.
Resources:
EventBus:
Type: AWS::Events::EventBus
Properties:
Name: AnyCompany
EventBusSSMParameter:
Type: AWS::SSM::Parameter
Properties:
Description: The ARN of the event bus for other services to consume
Name: /EventBusARN
Type: String
Value: !GetAtt EventBus.Arn
PublishEventsFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: publish-events/
Handler: app.lambdaHandler
Runtime: nodejs12.x
Policies:
- Statement:
- Effect: Allow
Action:
- events:PutEvents
Resource:
- !GetAtt EventBus.Arn
Outputs:
EventBusArn:
Description: "The ARN of the event bus"
Value: !GetAtt EventBus.Arn
EventBusName:
Description: "The name of the event bus"
Value: !GetAtt EventBus.Name
PublishEventsFunctionArn:
Description: "The ARN of our Lambda function"
Value: !GetAtt PublishEventsFunction.Arn