@awsless/awsless 0.0.15 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.MD ADDED
@@ -0,0 +1,212 @@
1
+
2
+
3
+ # TODO:
4
+ - onFailure for lambda, sqs, dynamodb streams
5
+ - add cache plugin & think about VPC lambda solutions
6
+ - add fargate container stuff for long lived services
7
+
8
+
9
+ ---
10
+ ---
11
+ ---
12
+
13
+ # Features
14
+
15
+ - Domains
16
+ - Functions
17
+ - Database
18
+ - Tables
19
+ - Stores
20
+ - Caches
21
+ - Searchs
22
+ - Queues
23
+ - Topics
24
+ - Pubsub
25
+ - Crons
26
+ - API
27
+ - HTTP
28
+ - GraphQL
29
+
30
+
31
+ ## Domains
32
+
33
+ We use AWS Route53 to provide domain management.
34
+
35
+ ```js
36
+ {
37
+ domains: {
38
+ 'example.com': [{
39
+ name: 'sub',
40
+ type: 'A',
41
+ records: [ ... ],
42
+ }],
43
+ }
44
+ }
45
+ ```
46
+
47
+ ## Functions
48
+
49
+ We use AWS Lambda to provide serverless functions.
50
+
51
+ ```js
52
+ {
53
+ defaults: {
54
+ function: {
55
+ // Setting default values for all functions...
56
+ }
57
+ },
58
+ stacks: [{
59
+ functions: {
60
+ FUNCTION_NAME: 'function.ts'
61
+ }
62
+ }]
63
+ }
64
+ ```
65
+
66
+ ## Tables
67
+
68
+ We use AWS DynamoDB to provide serverless tables.
69
+
70
+ ```js
71
+ {
72
+ stacks: [{
73
+ tables: {
74
+ TABLE_NAME: {
75
+ hash: 'id',
76
+ fields: {
77
+ id: 'string',
78
+ }
79
+ }
80
+ }
81
+ }]
82
+ }
83
+ ```
84
+
85
+ ## Stores
86
+
87
+ We use AWS S3 to provide serverless key-value storage.
88
+
89
+ ```js
90
+ {
91
+ stacks: [{
92
+ stores: [ 'STORE_NAME' ]
93
+ }]
94
+ }
95
+ ```
96
+
97
+ ## Caches
98
+
99
+ We use AWS MemoryDB to provide __redis compatible__ in-memory storage.
100
+
101
+ _WORK IN PROGRESS..._
102
+
103
+ ## Searchs
104
+
105
+ We use AWS Open Search Serverless to provide serverless search api.
106
+
107
+ ```js
108
+ {
109
+ stacks: [{
110
+ searchs: [ 'SEARCH_NAME' ]
111
+ }]
112
+ }
113
+ ```
114
+
115
+ ## Queues
116
+
117
+ We use AWS SQS to provide serverless queues.
118
+
119
+ ```js
120
+ {
121
+ stacks: [{
122
+ queues: {
123
+ QUEUE_NAME: 'queue-consumer.ts',
124
+ }
125
+ }]
126
+ }
127
+ ```
128
+
129
+ ## Topics
130
+
131
+ We use AWS SNS to provide serverless pubsub topics.
132
+
133
+ ```js
134
+ {
135
+ stacks: [{
136
+ topics: {
137
+ TOPIC_NAME: 'topic-consumer.ts',
138
+ }
139
+ }]
140
+ }
141
+ ```
142
+
143
+ ## Pubsub
144
+
145
+ We use AWS IoT to provide a serverless mqtt pubsub channel.
146
+
147
+ ```js
148
+ {
149
+ stacks: [{
150
+ pubsub: {
151
+ PUBSUB_NAME: {
152
+ sql: `SELECT * FROM '$aws/events/presence/connected/+'`,
153
+ consumer: 'pubsub-consumer.ts',
154
+ }
155
+ }
156
+ }]
157
+ }
158
+ ```
159
+
160
+ ## Crons
161
+
162
+ We use AWS Event Bridge to provide serverless cron jobs.
163
+
164
+ ```js
165
+ {
166
+ stacks: [{
167
+ crons: {
168
+ CRON_NAME: {
169
+ schedule: 'rate(1 day)',
170
+ consumer: 'cron-consumer.ts',
171
+ }
172
+ }
173
+ }]
174
+ }
175
+ ```
176
+
177
+ ## HTTP
178
+
179
+ We use AWS ELB to provide a REST HTTP API.
180
+
181
+ ```js
182
+ {
183
+ stacks: [{
184
+ http: {
185
+ HTTP_API_NAME: {
186
+ 'GET /posts': 'list-posts.ts',
187
+ 'POST /posts': 'create-post.ts',
188
+ }
189
+ }
190
+ }]
191
+ }
192
+ ```
193
+
194
+ ## GraphQL
195
+
196
+ We use AWS AppSync to provide a serverless GraphQL API.
197
+
198
+ ```js
199
+ {
200
+ stacks: [{
201
+ graphql: {
202
+ GRAPHQL_API_NAME: {
203
+ schema: 'schema.gql',
204
+ resolvers: {
205
+ 'Query posts': 'list-posts.ts',
206
+ 'Mutation createPost': 'create-post.ts',
207
+ }
208
+ }
209
+ }
210
+ }]
211
+ }
212
+ ```