@@ -26,7 +26,17 @@ provider:
26
26
- dynamodb:Query
27
27
- dynamodb:UpdateItem
28
28
Resource :
29
- - " Fn::Join " : ["", ["arn:aws:dynamodb:", {"Ref": "AWS::Region"}, ":", {"Ref": "AWS::AccountId"}, ":table/items*"]]
29
+ - " Fn::Join " :
30
+ [
31
+ " " ,
32
+ [
33
+ " arn:aws:dynamodb:" ,
34
+ { "Ref": "AWS::Region" },
35
+ " :" ,
36
+ { "Ref": "AWS::AccountId" },
37
+ " :table/items*" ,
38
+ ],
39
+ ]
30
40
31
41
package :
32
42
individually : true
@@ -35,8 +45,8 @@ custom:
35
45
customDomain :
36
46
domainName : sls-api.603.nz
37
47
stage : ${self:provider.stage}
38
- certificateArn : ${env:TF_VAR_acm_arn}
39
- hostedZoneId : ${env:TF_VAR_route53_zone_id}
48
+ certificateArn : ${env:TF_VAR_acm_arn, "" }
49
+ hostedZoneId : ${env:TF_VAR_route53_zone_id, "" }
40
50
webpack :
41
51
webpackConfig : ./webpack.config.ts
42
52
packager : " yarn"
@@ -158,43 +168,43 @@ resources:
158
168
Properties :
159
169
TableName : " items"
160
170
AttributeDefinitions :
161
- - AttributeName : " id"
162
- AttributeType : " S"
163
- - AttributeName : " userId"
164
- AttributeType : " S"
171
+ - AttributeName : " id"
172
+ AttributeType : " S"
173
+ - AttributeName : " userId"
174
+ AttributeType : " S"
165
175
KeySchema :
166
- - AttributeName : " id"
167
- KeyType : " HASH"
168
- - AttributeName : " userId"
169
- KeyType : " RANGE"
176
+ - AttributeName : " id"
177
+ KeyType : " HASH"
178
+ - AttributeName : " userId"
179
+ KeyType : " RANGE"
170
180
ProvisionedThroughput :
171
181
ReadCapacityUnits : 1
172
182
WriteCapacityUnits : 1
173
183
GlobalSecondaryIndexes :
174
- - IndexName : " userId-index"
175
- KeySchema :
176
- - AttributeName : " userId"
177
- KeyType : " HASH"
178
- Projection :
179
- ProjectionType : " ALL"
180
- ProvisionedThroughput :
181
- ReadCapacityUnits : 1
182
- WriteCapacityUnits : 1
184
+ - IndexName : " userId-index"
185
+ KeySchema :
186
+ - AttributeName : " userId"
187
+ KeyType : " HASH"
188
+ Projection :
189
+ ProjectionType : " ALL"
190
+ ProvisionedThroughput :
191
+ ReadCapacityUnits : 1
192
+ WriteCapacityUnits : 1
183
193
GatewayResponseDefault4XX :
184
- Type : ' AWS::ApiGateway::GatewayResponse'
194
+ Type : " AWS::ApiGateway::GatewayResponse"
185
195
Properties :
186
196
ResponseParameters :
187
197
gatewayresponse.header.Access-Control-Allow-Origin : " '*'"
188
198
gatewayresponse.header.Access-Control-Allow-Headers : " '*'"
189
199
ResponseType : DEFAULT_4XX
190
200
RestApiId :
191
- Ref : ' ApiGatewayRestApi'
201
+ Ref : " ApiGatewayRestApi"
192
202
GatewayResponseDefault5XX :
193
- Type : ' AWS::ApiGateway::GatewayResponse'
203
+ Type : " AWS::ApiGateway::GatewayResponse"
194
204
Properties :
195
205
ResponseParameters :
196
206
gatewayresponse.header.Access-Control-Allow-Origin : " '*'"
197
207
gatewayresponse.header.Access-Control-Allow-Headers : " '*'"
198
208
ResponseType : DEFAULT_5XX
199
209
RestApiId :
200
- Ref : ' ApiGatewayRestApi'
210
+ Ref : " ApiGatewayRestApi"
0 commit comments