-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsqs.yaml
58 lines (51 loc) · 1.21 KB
/
sqs.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
49
50
51
52
53
54
55
56
57
58
AWSTemplateFormatVersion: "2010-09-09"
Description: Stack for generate SQS Queue
Parameters:
ProjectName:
Type: String
Default: your_project_name
EnvironmentStage:
Type: String
Description: dev, prod, etc.
Default: dev
Resources:
NotificationQueue:
Type: AWS::SQS::Queue
Properties:
QueueName:
Fn::Join:
- '-'
- - !Ref ProjectName
- !Ref EnvironmentStage
- NotificationQueue
SqsManagedSseEnabled: true
DefaultQueuePolicy:
Type: AWS::SQS::QueuePolicy
Properties:
Queues:
- !Ref NotificationQueue
PolicyDocument:
Statement:
- Action:
- SQS:*
Effect: Allow
Resource: !GetAtt [ NotificationQueue, Arn ]
Principal:
AWS: !Ref AWS::AccountId
Outputs:
NotificationQueue:
Value: !Ref NotificationQueue
Export:
Name:
Fn::Join:
- '-'
- - !Ref AWS::StackName
- NotificationQueue
NotificationQueueArn:
Value: !GetAtt [ NotificationQueue, Arn ]
Export:
Name:
Fn::Join:
- '-'
- - !Ref AWS::StackName
- NotificationQueueArn