forked from fourTheorem/slic-watch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsls-resources.yml
149 lines (136 loc) · 3.51 KB
/
sls-resources.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
Resources:
stream:
Type: AWS::Kinesis::Stream
Properties:
Name: awesome-savage-stream
ShardCount: 1
bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: awesome-savage-bucket
dataTable:
Type: AWS::DynamoDB::Table
DeletionPolicy: Delete
Properties:
TableName: MyTable
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
AttributeDefinitions:
- AttributeName: pk
AttributeType: S
- AttributeName: sk
AttributeType: S
- AttributeName: gsi1pk
AttributeType: S
- AttributeName: gsi1sk
AttributeType: S
- AttributeName: timestamp
AttributeType: N
KeySchema:
- AttributeName: pk
KeyType: HASH
- AttributeName: sk
KeyType: RANGE
GlobalSecondaryIndexes:
- IndexName: GSI1
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
KeySchema:
- AttributeName: gsi1pk
KeyType: HASH
- AttributeName: gsi1sk
KeyType: RANGE
Projection:
NonKeyAttributes:
- address
ProjectionType: INCLUDE
LocalSecondaryIndexes:
- IndexName: LSI1
KeySchema:
- AttributeName: pk
KeyType: HASH
- AttributeName: timestamp
KeyType: RANGE
Projection:
NonKeyAttributes:
- name
ProjectionType: INCLUDE
regularQueue:
Type: "AWS::SQS::Queue"
Properties:
QueueName: "SomeRegularQueue"
fifoQueue:
Type: "AWS::SQS::Queue"
Properties:
QueueName: "SomeFifoQueue.fifo"
FifoQueue: true
workflowLogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: WorkflowLogs
RetentionInDays: 1
expressWorkflowLogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: ExpressWorkflowLogs
RetentionInDays: 1
vpc:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
subnet:
Type: AWS::EC2::Subnet
Properties:
AvailabilityZone: ${self:provider.region}a
CidrBlock: 10.0.16.0/20
VpcId: !Ref vpc
ecsCluster:
Type: AWS::ECS::Cluster
Properties:
ClusterName: awesome-cluster
ecsService:
Type: AWS::ECS::Service
Properties:
ServiceName: awesome-service
Cluster:
Ref: ecsCluster
DesiredCount: 0
LaunchType: FARGATE
TaskDefinition: !Ref taskDef
NetworkConfiguration:
AwsvpcConfiguration:
AssignPublicIp: ENABLED
SecurityGroups: []
Subnets:
- !Ref subnet
taskDef:
Type: AWS::ECS::TaskDefinition
Properties:
RequiresCompatibilities:
- FARGATE
Cpu: 256
Memory: 512
ContainerDefinitions:
- Name: "busybox"
Image: "busybox"
Cpu: 256
EntryPoint:
- "sh"
- "-c"
Memory: 512
Command:
- "/bin/sh -c \"while true; do echo Hello; sleep 10; done\""
Essential: true
NetworkMode: awsvpc
topic:
Type: AWS::SNS::Topic
Properties:
TopicName: awesome-savage-topic
subscriptionTest:
Type: AWS::SNS::Subscription
Properties:
Endpoint: !Sub "https://${ApiGatewayRestApi}.execute-api.${AWS::Region}.amazonaws.com/${self:provider.stage}/subscription"
Protocol: https
TopicArn: !Ref topic