-
Notifications
You must be signed in to change notification settings - Fork 12
/
serverless.yml
94 lines (94 loc) · 2.54 KB
/
serverless.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
service: my-microservice
provider:
name: aws
runtime: python3.8
environment:
SERVICE: ${self:service}
resources:
Resources:
EventQueue:
Type: "AWS::SQS::Queue"
Properties:
QueueName: my-super-queue
EventQueue2:
Type: "AWS::SQS::Queue"
Properties:
QueueName: my-super-queue2
DelaySeconds: 0
FifoQueue: false
KmsDataKeyReusePeriodSeconds: 300
MaximumMessageSize: 262144
MessageRetentionPeriod: 2000
ReceiveMessageWaitTimeSeconds: 0
RedrivePolicy:
deadLetterTargetArn : "arn:aws:sqs:us-east-2:444455556666:queue1"
maxReceiveCount : 1
Tags:
-
key: "key1"
value: "value1"
VisibilityTimeout: 1000
TableA:
Type: 'AWS::DynamoDB::Table'
DeletionPolicy: Delete
Properties:
TableName: ${self:service}.my-table
AttributeDefinitions:
- AttributeName: id
AttributeType: S
- AttributeName: company_id
AttributeType: S
KeySchema:
- AttributeName: id
KeyType: HASH
GlobalSecondaryIndexes:
- IndexName: company_id
KeySchema:
- AttributeName: company_id
KeyType: HASH
Projection:
ProjectionType: ALL
ProvisionedThroughput:
ReadCapacityUnits: 10
WriteCapacityUnits: 30
ProvisionedThroughput:
ReadCapacityUnits: 10
WriteCapacityUnits: 30
TableB:
Type: 'AWS::DynamoDB::Table'
DeletionPolicy: Delete
Properties:
TableName: my-microservice-second.my-table
AttributeDefinitions:
- AttributeName: id
AttributeType: S
- AttributeName: company_id
AttributeType: S
KeySchema:
- AttributeName: id
KeyType: HASH
GlobalSecondaryIndexes:
- IndexName: company_id
KeySchema:
- AttributeName: company_id
KeyType: HASH
Projection:
ProjectionType: ALL
ProvisionedThroughput:
ReadCapacityUnits: 10
WriteCapacityUnits: 30
ProvisionedThroughput:
ReadCapacityUnits: 10
WriteCapacityUnits: 30
S3Bucket:
Type: 'AWS::S3::Bucket'
Properties:
BucketName: "org-example.my-bucket"
SnsTopic:
Type: 'AWS::SNS::Topic'
Properties:
TopicName: "org-example-my-sns-topic"
KMSKey:
Type: AWS::KMS::Key
Properties:
Description: An example symmetric CMK