-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathSQSEncrypt.py
35 lines (29 loc) · 1021 Bytes
/
SQSEncrypt.py
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
# Converted from SQS_With_CloudWatch_Alarms.template located at:
# http://aws.amazon.com/cloudformation/aws-cloudformation-templates/
from troposphere import GetAtt, Output, Ref, Template
from troposphere.sqs import Queue
t = Template()
t.set_description(
"AWS CloudFormation Sample Template SQS: Sample template showing how to "
"create an SQS queue with Server Side Encryption. **WARNING** This "
"template creates Amazon SQS Queues. You will be billed for the AWS "
"resources used if you create a stack from this template."
)
mysourcequeue = t.add_resource(
Queue("MySourceQueue", KmsMasterKeyId="testing", KmsDataKeyReusePeriodSeconds=60)
)
t.add_output(
[
Output(
"SourceQueueURL",
Description="URL of the source queue",
Value=Ref(mysourcequeue),
),
Output(
"SourceQueueARN",
Description="ARN of the source queue",
Value=GetAtt(mysourcequeue, "Arn"),
),
]
)
print(t.to_json())