@auth-craft/aws-cf-stack 1.7.1 → 1.8.0

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.
@@ -0,0 +1,21 @@
1
+ {
2
+ "version": "54.0.0",
3
+ "files": {
4
+ "35b39360363db4b05654063b277be1e35b9f188048f8264c3c0d2bc6f7570709": {
5
+ "displayName": "snapshot-commerce-prod-auth-data Template",
6
+ "source": {
7
+ "path": "snapshot-commerce-prod-auth-data.template.json",
8
+ "packaging": "file"
9
+ },
10
+ "destinations": {
11
+ "123456789012-us-east-1-992bf4c8": {
12
+ "bucketName": "cdk-hnb659fds-assets-123456789012-us-east-1",
13
+ "objectKey": "35b39360363db4b05654063b277be1e35b9f188048f8264c3c0d2bc6f7570709.json",
14
+ "region": "us-east-1",
15
+ "assumeRoleArn": "arn:${AWS::Partition}:iam::123456789012:role/cdk-hnb659fds-file-publishing-role-123456789012-us-east-1"
16
+ }
17
+ }
18
+ }
19
+ },
20
+ "dockerImages": {}
21
+ }
@@ -0,0 +1,151 @@
1
+ {
2
+ "/snapshot-commerce-prod-auth-data": [
3
+ {
4
+ "type": "aws:cdk:creationStack",
5
+ "data": [
6
+ "<anonymous> (/home/minhtaimc/projects/auth-craft/packages/aws-cf-stack/cdk/bin/app.ts:54:23)",
7
+ "...node internals..."
8
+ ]
9
+ },
10
+ {
11
+ "type": "aws:cdk:stack-tags",
12
+ "data": [
13
+ {
14
+ "key": "Application",
15
+ "value": "AuthCraft"
16
+ },
17
+ {
18
+ "key": "Environment",
19
+ "value": "prod"
20
+ },
21
+ {
22
+ "key": "ManagedBy",
23
+ "value": "CDK"
24
+ },
25
+ {
26
+ "key": "Project",
27
+ "value": "default"
28
+ }
29
+ ]
30
+ }
31
+ ],
32
+ "/snapshot-commerce-prod-auth-data/AuthCraftTable": [
33
+ {
34
+ "type": "aws:cdk:hasPhysicalName",
35
+ "data": {
36
+ "Ref": "AuthCraftTableDF046C42"
37
+ }
38
+ }
39
+ ],
40
+ "/snapshot-commerce-prod-auth-data/TableName": [
41
+ {
42
+ "type": "aws:cdk:logicalId",
43
+ "data": "TableName"
44
+ },
45
+ {
46
+ "type": "aws:cdk:creationStack",
47
+ "data": [
48
+ "new DynamoDBStack (/home/minhtaimc/projects/auth-craft/packages/aws-cf-stack/cdk/lib/dynamodb-stack.ts:120:5)",
49
+ "<anonymous> (/home/minhtaimc/projects/auth-craft/packages/aws-cf-stack/cdk/bin/app.ts:54:23)",
50
+ "...node internals..."
51
+ ]
52
+ }
53
+ ],
54
+ "/snapshot-commerce-prod-auth-data/TableArn": [
55
+ {
56
+ "type": "aws:cdk:logicalId",
57
+ "data": "TableArn"
58
+ },
59
+ {
60
+ "type": "aws:cdk:creationStack",
61
+ "data": [
62
+ "new DynamoDBStack (/home/minhtaimc/projects/auth-craft/packages/aws-cf-stack/cdk/lib/dynamodb-stack.ts:126:5)",
63
+ "<anonymous> (/home/minhtaimc/projects/auth-craft/packages/aws-cf-stack/cdk/bin/app.ts:54:23)",
64
+ "...node internals..."
65
+ ]
66
+ }
67
+ ],
68
+ "/snapshot-commerce-prod-auth-data/BootstrapVersion": [
69
+ {
70
+ "type": "aws:cdk:logicalId",
71
+ "data": "BootstrapVersion"
72
+ },
73
+ {
74
+ "type": "aws:cdk:creationStack",
75
+ "data": [
76
+ "....pnpm...",
77
+ "(no user code in 10 frames, use --stack-trace-limit to capture more)"
78
+ ]
79
+ }
80
+ ],
81
+ "/snapshot-commerce-prod-auth-data/CheckBootstrapVersion": [
82
+ {
83
+ "type": "aws:cdk:logicalId",
84
+ "data": "CheckBootstrapVersion"
85
+ },
86
+ {
87
+ "type": "aws:cdk:creationStack",
88
+ "data": [
89
+ "....pnpm...",
90
+ "(no user code in 10 frames, use --stack-trace-limit to capture more)"
91
+ ]
92
+ }
93
+ ],
94
+ "/snapshot-commerce-prod-auth-data/AuthCraftTable/Resource": [
95
+ {
96
+ "type": "aws:cdk:logicalId",
97
+ "data": "AuthCraftTableDF046C42"
98
+ },
99
+ {
100
+ "type": "aws:cdk:creationStack",
101
+ "data": [
102
+ "...new Table2 in .pnpm...",
103
+ "new DynamoDBStack (/home/minhtaimc/projects/auth-craft/packages/aws-cf-stack/cdk/lib/dynamodb-stack.ts:21:18)",
104
+ "<anonymous> (/home/minhtaimc/projects/auth-craft/packages/aws-cf-stack/cdk/bin/app.ts:54:23)",
105
+ "...node internals..."
106
+ ]
107
+ }
108
+ ],
109
+ "/snapshot-commerce-prod-auth-data/CDKMetadata/Default": [
110
+ {
111
+ "type": "aws:cdk:logicalId",
112
+ "data": "CDKMetadata"
113
+ },
114
+ {
115
+ "type": "aws:cdk:creationStack",
116
+ "data": [
117
+ "...App.synth in .pnpm...",
118
+ "<anonymous> (/home/minhtaimc/projects/auth-craft/packages/aws-cf-stack/cdk/bin/app.ts:84:5)",
119
+ "...node internals..."
120
+ ]
121
+ }
122
+ ],
123
+ "/snapshot-commerce-prod-auth-data/Exports/Output{\"Fn::GetAtt\":[\"AuthCraftTableDF046C42\",\"Arn\"]}": [
124
+ {
125
+ "type": "aws:cdk:logicalId",
126
+ "data": "ExportsOutputFnGetAttAuthCraftTableDF046C42Arn23A8D6C1"
127
+ },
128
+ {
129
+ "type": "aws:cdk:creationStack",
130
+ "data": [
131
+ "...App.synth in .pnpm...",
132
+ "<anonymous> (/home/minhtaimc/projects/auth-craft/packages/aws-cf-stack/cdk/bin/app.ts:84:5)",
133
+ "...node internals..."
134
+ ]
135
+ }
136
+ ],
137
+ "/snapshot-commerce-prod-auth-data/Exports/Output{\"Ref\":\"AuthCraftTableDF046C42\"}": [
138
+ {
139
+ "type": "aws:cdk:logicalId",
140
+ "data": "ExportsOutputRefAuthCraftTableDF046C42F3882570"
141
+ },
142
+ {
143
+ "type": "aws:cdk:creationStack",
144
+ "data": [
145
+ "...App.synth in .pnpm...",
146
+ "<anonymous> (/home/minhtaimc/projects/auth-craft/packages/aws-cf-stack/cdk/bin/app.ts:84:5)",
147
+ "...node internals..."
148
+ ]
149
+ }
150
+ ]
151
+ }
@@ -0,0 +1,371 @@
1
+ {
2
+ "Description": "Auth Craft DynamoDB (snapshot-commerce-prod-auth)",
3
+ "Resources": {
4
+ "AuthCraftTableDF046C42": {
5
+ "Type": "AWS::DynamoDB::Table",
6
+ "Properties": {
7
+ "AttributeDefinitions": [
8
+ {
9
+ "AttributeName": "PK",
10
+ "AttributeType": "S"
11
+ },
12
+ {
13
+ "AttributeName": "SK",
14
+ "AttributeType": "S"
15
+ },
16
+ {
17
+ "AttributeName": "activeSessionPk",
18
+ "AttributeType": "S"
19
+ },
20
+ {
21
+ "AttributeName": "activeSessionSk",
22
+ "AttributeType": "S"
23
+ },
24
+ {
25
+ "AttributeName": "userSessionPk",
26
+ "AttributeType": "S"
27
+ },
28
+ {
29
+ "AttributeName": "userSessionSk",
30
+ "AttributeType": "S"
31
+ },
32
+ {
33
+ "AttributeName": "userStatusPk",
34
+ "AttributeType": "S"
35
+ },
36
+ {
37
+ "AttributeName": "userStatusSk",
38
+ "AttributeType": "S"
39
+ },
40
+ {
41
+ "AttributeName": "userProviderPk",
42
+ "AttributeType": "S"
43
+ },
44
+ {
45
+ "AttributeName": "userProviderSk",
46
+ "AttributeType": "S"
47
+ },
48
+ {
49
+ "AttributeName": "identityUserPk",
50
+ "AttributeType": "S"
51
+ },
52
+ {
53
+ "AttributeName": "identityUserSk",
54
+ "AttributeType": "S"
55
+ },
56
+ {
57
+ "AttributeName": "credentialUserPk",
58
+ "AttributeType": "S"
59
+ },
60
+ {
61
+ "AttributeName": "credentialUserSk",
62
+ "AttributeType": "S"
63
+ },
64
+ {
65
+ "AttributeName": "userTenantPk",
66
+ "AttributeType": "S"
67
+ },
68
+ {
69
+ "AttributeName": "userTenantSk",
70
+ "AttributeType": "S"
71
+ },
72
+ {
73
+ "AttributeName": "inviteTenantPk",
74
+ "AttributeType": "S"
75
+ },
76
+ {
77
+ "AttributeName": "inviteTenantSk",
78
+ "AttributeType": "S"
79
+ }
80
+ ],
81
+ "BillingMode": "PAY_PER_REQUEST",
82
+ "DeletionProtectionEnabled": true,
83
+ "GlobalSecondaryIndexes": [
84
+ {
85
+ "IndexName": "GSI_ActiveSessions",
86
+ "KeySchema": [
87
+ {
88
+ "AttributeName": "activeSessionPk",
89
+ "KeyType": "HASH"
90
+ },
91
+ {
92
+ "AttributeName": "activeSessionSk",
93
+ "KeyType": "RANGE"
94
+ }
95
+ ],
96
+ "Projection": {
97
+ "ProjectionType": "KEYS_ONLY"
98
+ }
99
+ },
100
+ {
101
+ "IndexName": "GSI_UserSessions",
102
+ "KeySchema": [
103
+ {
104
+ "AttributeName": "userSessionPk",
105
+ "KeyType": "HASH"
106
+ },
107
+ {
108
+ "AttributeName": "userSessionSk",
109
+ "KeyType": "RANGE"
110
+ }
111
+ ],
112
+ "Projection": {
113
+ "ProjectionType": "KEYS_ONLY"
114
+ }
115
+ },
116
+ {
117
+ "IndexName": "GSI_UsersByStatus",
118
+ "KeySchema": [
119
+ {
120
+ "AttributeName": "userStatusPk",
121
+ "KeyType": "HASH"
122
+ },
123
+ {
124
+ "AttributeName": "userStatusSk",
125
+ "KeyType": "RANGE"
126
+ }
127
+ ],
128
+ "Projection": {
129
+ "NonKeyAttributes": [
130
+ "displayName",
131
+ "createdAt"
132
+ ],
133
+ "ProjectionType": "INCLUDE"
134
+ }
135
+ },
136
+ {
137
+ "IndexName": "GSI_UserProviders",
138
+ "KeySchema": [
139
+ {
140
+ "AttributeName": "userProviderPk",
141
+ "KeyType": "HASH"
142
+ },
143
+ {
144
+ "AttributeName": "userProviderSk",
145
+ "KeyType": "RANGE"
146
+ }
147
+ ],
148
+ "Projection": {
149
+ "NonKeyAttributes": [
150
+ "userId",
151
+ "externalEmail",
152
+ "externalName",
153
+ "createdAt"
154
+ ],
155
+ "ProjectionType": "INCLUDE"
156
+ }
157
+ },
158
+ {
159
+ "IndexName": "GSI_UserIdentities",
160
+ "KeySchema": [
161
+ {
162
+ "AttributeName": "identityUserPk",
163
+ "KeyType": "HASH"
164
+ },
165
+ {
166
+ "AttributeName": "identityUserSk",
167
+ "KeyType": "RANGE"
168
+ }
169
+ ],
170
+ "Projection": {
171
+ "NonKeyAttributes": [
172
+ "loginEnabled",
173
+ "verifiedAt",
174
+ "createdAt"
175
+ ],
176
+ "ProjectionType": "INCLUDE"
177
+ }
178
+ },
179
+ {
180
+ "IndexName": "GSI_UserCredentials",
181
+ "KeySchema": [
182
+ {
183
+ "AttributeName": "credentialUserPk",
184
+ "KeyType": "HASH"
185
+ },
186
+ {
187
+ "AttributeName": "credentialUserSk",
188
+ "KeyType": "RANGE"
189
+ }
190
+ ],
191
+ "Projection": {
192
+ "NonKeyAttributes": [
193
+ "revokedAt",
194
+ "createdAt"
195
+ ],
196
+ "ProjectionType": "INCLUDE"
197
+ }
198
+ },
199
+ {
200
+ "IndexName": "GSI_UserTenants",
201
+ "KeySchema": [
202
+ {
203
+ "AttributeName": "userTenantPk",
204
+ "KeyType": "HASH"
205
+ },
206
+ {
207
+ "AttributeName": "userTenantSk",
208
+ "KeyType": "RANGE"
209
+ }
210
+ ],
211
+ "Projection": {
212
+ "NonKeyAttributes": [
213
+ "userStatus",
214
+ "role",
215
+ "roles",
216
+ "perm",
217
+ "authPerm",
218
+ "isOwner",
219
+ "createdAt",
220
+ "updatedAt"
221
+ ],
222
+ "ProjectionType": "INCLUDE"
223
+ }
224
+ },
225
+ {
226
+ "IndexName": "GSI_TenantInvites",
227
+ "KeySchema": [
228
+ {
229
+ "AttributeName": "inviteTenantPk",
230
+ "KeyType": "HASH"
231
+ },
232
+ {
233
+ "AttributeName": "inviteTenantSk",
234
+ "KeyType": "RANGE"
235
+ }
236
+ ],
237
+ "Projection": {
238
+ "ProjectionType": "ALL"
239
+ }
240
+ }
241
+ ],
242
+ "KeySchema": [
243
+ {
244
+ "AttributeName": "PK",
245
+ "KeyType": "HASH"
246
+ },
247
+ {
248
+ "AttributeName": "SK",
249
+ "KeyType": "RANGE"
250
+ }
251
+ ],
252
+ "PointInTimeRecoverySpecification": {
253
+ "PointInTimeRecoveryEnabled": true
254
+ },
255
+ "TableName": "snapshot-commerce-prod-auth-data",
256
+ "Tags": [
257
+ {
258
+ "Key": "Application",
259
+ "Value": "AuthCraft"
260
+ },
261
+ {
262
+ "Key": "Environment",
263
+ "Value": "prod"
264
+ },
265
+ {
266
+ "Key": "ManagedBy",
267
+ "Value": "CDK"
268
+ },
269
+ {
270
+ "Key": "Project",
271
+ "Value": "default"
272
+ }
273
+ ],
274
+ "TimeToLiveSpecification": {
275
+ "AttributeName": "TTL",
276
+ "Enabled": true
277
+ }
278
+ },
279
+ "UpdateReplacePolicy": "Retain",
280
+ "DeletionPolicy": "Retain",
281
+ "Metadata": {
282
+ "aws:cdk:path": "snapshot-commerce-prod-auth-data/AuthCraftTable/Resource"
283
+ }
284
+ },
285
+ "CDKMetadata": {
286
+ "Type": "AWS::CDK::Metadata",
287
+ "Properties": {
288
+ "Analytics": "v2:deflate64:H4sIAAAAAAAA/zPSMzIz0DNQTCwv1k1OydbNyUzSqw4uSUzO1kksL45PqcxLzM1PSdKrDklMyknVcU7LAzNqdYJSi/NLi5LBQv6lJQWlJbU6efkpqXpZxfplRiZ6hqZ6BopZxZmZukWleSWZual6QRAaAIpxCIVyAAAA"
289
+ },
290
+ "Metadata": {
291
+ "aws:cdk:path": "snapshot-commerce-prod-auth-data/CDKMetadata/Default"
292
+ }
293
+ }
294
+ },
295
+ "Outputs": {
296
+ "TableName": {
297
+ "Description": "DynamoDB table name",
298
+ "Value": {
299
+ "Ref": "AuthCraftTableDF046C42"
300
+ },
301
+ "Export": {
302
+ "Name": "snapshot-commerce-prod-auth-data-TableName"
303
+ }
304
+ },
305
+ "TableArn": {
306
+ "Description": "DynamoDB table ARN",
307
+ "Value": {
308
+ "Fn::GetAtt": [
309
+ "AuthCraftTableDF046C42",
310
+ "Arn"
311
+ ]
312
+ },
313
+ "Export": {
314
+ "Name": "snapshot-commerce-prod-auth-data-TableArn"
315
+ }
316
+ },
317
+ "ExportsOutputFnGetAttAuthCraftTableDF046C42Arn23A8D6C1": {
318
+ "Value": {
319
+ "Fn::GetAtt": [
320
+ "AuthCraftTableDF046C42",
321
+ "Arn"
322
+ ]
323
+ },
324
+ "Export": {
325
+ "Name": "snapshot-commerce-prod-auth-data:ExportsOutputFnGetAttAuthCraftTableDF046C42Arn23A8D6C1"
326
+ }
327
+ },
328
+ "ExportsOutputRefAuthCraftTableDF046C42F3882570": {
329
+ "Value": {
330
+ "Ref": "AuthCraftTableDF046C42"
331
+ },
332
+ "Export": {
333
+ "Name": "snapshot-commerce-prod-auth-data:ExportsOutputRefAuthCraftTableDF046C42F3882570"
334
+ }
335
+ }
336
+ },
337
+ "Parameters": {
338
+ "BootstrapVersion": {
339
+ "Type": "AWS::SSM::Parameter::Value<String>",
340
+ "Default": "/cdk-bootstrap/hnb659fds/version",
341
+ "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
342
+ }
343
+ },
344
+ "Rules": {
345
+ "CheckBootstrapVersion": {
346
+ "Assertions": [
347
+ {
348
+ "Assert": {
349
+ "Fn::Not": [
350
+ {
351
+ "Fn::Contains": [
352
+ [
353
+ "1",
354
+ "2",
355
+ "3",
356
+ "4",
357
+ "5"
358
+ ],
359
+ {
360
+ "Ref": "BootstrapVersion"
361
+ }
362
+ ]
363
+ }
364
+ ]
365
+ },
366
+ "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
367
+ }
368
+ ]
369
+ }
370
+ }
371
+ }
@@ -0,0 +1 @@
1
+ {"version":"tree-0.1","tree":{"id":"App","path":"","constructInfo":{"fqn":"aws-cdk-lib.App","version":"2.260.0"},"children":{"snapshot-commerce-prod-auth-data":{"id":"snapshot-commerce-prod-auth-data","path":"snapshot-commerce-prod-auth-data","constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"2.260.0"},"children":{"AuthCraftTable":{"id":"AuthCraftTable","path":"snapshot-commerce-prod-auth-data/AuthCraftTable","constructInfo":{"fqn":"aws-cdk-lib.aws_dynamodb.Table","version":"2.260.0"},"children":{"Resource":{"id":"Resource","path":"snapshot-commerce-prod-auth-data/AuthCraftTable/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_dynamodb.CfnTable","version":"2.260.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::DynamoDB::Table","aws:cdk:cloudformation:logicalId":"AuthCraftTableDF046C42","aws:cdk:cloudformation:props":{"attributeDefinitions":[{"attributeName":"PK","attributeType":"S"},{"attributeName":"SK","attributeType":"S"},{"attributeName":"activeSessionPk","attributeType":"S"},{"attributeName":"activeSessionSk","attributeType":"S"},{"attributeName":"userSessionPk","attributeType":"S"},{"attributeName":"userSessionSk","attributeType":"S"},{"attributeName":"userStatusPk","attributeType":"S"},{"attributeName":"userStatusSk","attributeType":"S"},{"attributeName":"userProviderPk","attributeType":"S"},{"attributeName":"userProviderSk","attributeType":"S"},{"attributeName":"identityUserPk","attributeType":"S"},{"attributeName":"identityUserSk","attributeType":"S"},{"attributeName":"credentialUserPk","attributeType":"S"},{"attributeName":"credentialUserSk","attributeType":"S"},{"attributeName":"userTenantPk","attributeType":"S"},{"attributeName":"userTenantSk","attributeType":"S"},{"attributeName":"inviteTenantPk","attributeType":"S"},{"attributeName":"inviteTenantSk","attributeType":"S"}],"billingMode":"PAY_PER_REQUEST","deletionProtectionEnabled":true,"globalSecondaryIndexes":[{"indexName":"GSI_ActiveSessions","keySchema":[{"attributeName":"activeSessionPk","keyType":"HASH"},{"attributeName":"activeSessionSk","keyType":"RANGE"}],"projection":{"projectionType":"KEYS_ONLY"}},{"indexName":"GSI_UserSessions","keySchema":[{"attributeName":"userSessionPk","keyType":"HASH"},{"attributeName":"userSessionSk","keyType":"RANGE"}],"projection":{"projectionType":"KEYS_ONLY"}},{"indexName":"GSI_UsersByStatus","keySchema":[{"attributeName":"userStatusPk","keyType":"HASH"},{"attributeName":"userStatusSk","keyType":"RANGE"}],"projection":{"projectionType":"INCLUDE","nonKeyAttributes":["displayName","createdAt"]}},{"indexName":"GSI_UserProviders","keySchema":[{"attributeName":"userProviderPk","keyType":"HASH"},{"attributeName":"userProviderSk","keyType":"RANGE"}],"projection":{"projectionType":"INCLUDE","nonKeyAttributes":["userId","externalEmail","externalName","createdAt"]}},{"indexName":"GSI_UserIdentities","keySchema":[{"attributeName":"identityUserPk","keyType":"HASH"},{"attributeName":"identityUserSk","keyType":"RANGE"}],"projection":{"projectionType":"INCLUDE","nonKeyAttributes":["loginEnabled","verifiedAt","createdAt"]}},{"indexName":"GSI_UserCredentials","keySchema":[{"attributeName":"credentialUserPk","keyType":"HASH"},{"attributeName":"credentialUserSk","keyType":"RANGE"}],"projection":{"projectionType":"INCLUDE","nonKeyAttributes":["revokedAt","createdAt"]}},{"indexName":"GSI_UserTenants","keySchema":[{"attributeName":"userTenantPk","keyType":"HASH"},{"attributeName":"userTenantSk","keyType":"RANGE"}],"projection":{"projectionType":"INCLUDE","nonKeyAttributes":["userStatus","role","roles","perm","authPerm","isOwner","createdAt","updatedAt"]}},{"indexName":"GSI_TenantInvites","keySchema":[{"attributeName":"inviteTenantPk","keyType":"HASH"},{"attributeName":"inviteTenantSk","keyType":"RANGE"}],"projection":{"projectionType":"ALL"}}],"keySchema":[{"attributeName":"PK","keyType":"HASH"},{"attributeName":"SK","keyType":"RANGE"}],"pointInTimeRecoverySpecification":{"pointInTimeRecoveryEnabled":true},"tableName":"snapshot-commerce-prod-auth-data","tags":[{"key":"Application","value":"AuthCraft"},{"key":"Environment","value":"prod"},{"key":"ManagedBy","value":"CDK"},{"key":"Project","value":"default"}],"timeToLiveSpecification":{"attributeName":"TTL","enabled":true}}}},"ScalingRole":{"id":"ScalingRole","path":"snapshot-commerce-prod-auth-data/AuthCraftTable/ScalingRole","constructInfo":{"fqn":"aws-cdk-lib.Resource","version":"2.260.0"}}}},"TableName":{"id":"TableName","path":"snapshot-commerce-prod-auth-data/TableName","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.260.0"}},"TableArn":{"id":"TableArn","path":"snapshot-commerce-prod-auth-data/TableArn","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.260.0"}},"CDKMetadata":{"id":"CDKMetadata","path":"snapshot-commerce-prod-auth-data/CDKMetadata","constructInfo":{"fqn":"constructs.Construct","version":"10.6.0"},"children":{"Default":{"id":"Default","path":"snapshot-commerce-prod-auth-data/CDKMetadata/Default","constructInfo":{"fqn":"aws-cdk-lib.CfnResource","version":"2.260.0"}}}},"Exports":{"id":"Exports","path":"snapshot-commerce-prod-auth-data/Exports","constructInfo":{"fqn":"constructs.Construct","version":"10.6.0"},"children":{"Output{\"Fn::GetAtt\":[\"AuthCraftTableDF046C42\",\"Arn\"]}":{"id":"Output{\"Fn::GetAtt\":[\"AuthCraftTableDF046C42\",\"Arn\"]}","path":"snapshot-commerce-prod-auth-data/Exports/Output{\"Fn::GetAtt\":[\"AuthCraftTableDF046C42\",\"Arn\"]}","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.260.0"}},"Output{\"Ref\":\"AuthCraftTableDF046C42\"}":{"id":"Output{\"Ref\":\"AuthCraftTableDF046C42\"}","path":"snapshot-commerce-prod-auth-data/Exports/Output{\"Ref\":\"AuthCraftTableDF046C42\"}","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.260.0"}}}},"BootstrapVersion":{"id":"BootstrapVersion","path":"snapshot-commerce-prod-auth-data/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"2.260.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"snapshot-commerce-prod-auth-data/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"2.260.0"}}}},"snapshot-commerce-prod-auth-api":{"id":"snapshot-commerce-prod-auth-api","path":"snapshot-commerce-prod-auth-api","constructInfo":{"fqn":"aws-cdk-lib.Stack","version":"2.260.0"},"children":{"AuthLambdaLogGroup":{"id":"AuthLambdaLogGroup","path":"snapshot-commerce-prod-auth-api/AuthLambdaLogGroup","constructInfo":{"fqn":"aws-cdk-lib.aws_logs.LogGroup","version":"2.260.0"},"children":{"Resource":{"id":"Resource","path":"snapshot-commerce-prod-auth-api/AuthLambdaLogGroup/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_logs.CfnLogGroup","version":"2.260.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Logs::LogGroup","aws:cdk:cloudformation:logicalId":"AuthLambdaLogGroupF58ADE9F","aws:cdk:cloudformation:props":{"logGroupName":"/aws/lambda/snapshot-commerce-prod-auth-api","retentionInDays":30,"tags":[{"key":"Application","value":"AuthCraft"},{"key":"Environment","value":"prod"},{"key":"ManagedBy","value":"CDK"},{"key":"Project","value":"default"}]}}}}},"AuthLambda":{"id":"AuthLambda","path":"snapshot-commerce-prod-auth-api/AuthLambda","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.Function","version":"2.260.0"},"children":{"ServiceRole":{"id":"ServiceRole","path":"snapshot-commerce-prod-auth-api/AuthLambda/ServiceRole","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Role","version":"2.260.0"},"children":{"Resource":{"id":"Resource","path":"snapshot-commerce-prod-auth-api/AuthLambda/ServiceRole/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnRole","version":"2.260.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Role","aws:cdk:cloudformation:logicalId":"AuthLambdaServiceRole7D6ECDEC","aws:cdk:cloudformation:props":{"assumeRolePolicyDocument":{"Statement":[{"Action":"sts:AssumeRole","Effect":"Allow","Principal":{"Service":"lambda.amazonaws.com"}}],"Version":"2012-10-17"},"managedPolicyArns":[{"Fn::Join":["",["arn:",{"Ref":"AWS::Partition"},":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"]]}],"tags":[{"key":"Application","value":"AuthCraft"},{"key":"Environment","value":"prod"},{"key":"ManagedBy","value":"CDK"},{"key":"Project","value":"default"}]}}},"DefaultPolicy":{"id":"DefaultPolicy","path":"snapshot-commerce-prod-auth-api/AuthLambda/ServiceRole/DefaultPolicy","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.Policy","version":"2.260.0"},"children":{"Resource":{"id":"Resource","path":"snapshot-commerce-prod-auth-api/AuthLambda/ServiceRole/DefaultPolicy/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_iam.CfnPolicy","version":"2.260.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::IAM::Policy","aws:cdk:cloudformation:logicalId":"AuthLambdaServiceRoleDefaultPolicy733D72E7","aws:cdk:cloudformation:props":{"policyDocument":{"Statement":[{"Action":["xray:PutTelemetryRecords","xray:PutTraceSegments"],"Effect":"Allow","Resource":"*"},{"Action":["dynamodb:BatchGetItem","dynamodb:BatchWriteItem","dynamodb:ConditionCheckItem","dynamodb:DeleteItem","dynamodb:DescribeTable","dynamodb:GetItem","dynamodb:GetRecords","dynamodb:GetShardIterator","dynamodb:PutItem","dynamodb:Query","dynamodb:Scan","dynamodb:UpdateItem"],"Effect":"Allow","Resource":[{"Fn::ImportValue":"snapshot-commerce-prod-auth-data:ExportsOutputFnGetAttAuthCraftTableDF046C42Arn23A8D6C1"},{"Fn::Join":["",[{"Fn::ImportValue":"snapshot-commerce-prod-auth-data:ExportsOutputFnGetAttAuthCraftTableDF046C42Arn23A8D6C1"},"/index/*"]]}]}],"Version":"2012-10-17"},"policyName":"AuthLambdaServiceRoleDefaultPolicy733D72E7","roles":[{"Ref":"AuthLambdaServiceRole7D6ECDEC"}]}}}}}}},"Code":{"id":"Code","path":"snapshot-commerce-prod-auth-api/AuthLambda/Code","constructInfo":{"fqn":"aws-cdk-lib.aws_s3_assets.Asset","version":"2.260.0"},"children":{"Stage":{"id":"Stage","path":"snapshot-commerce-prod-auth-api/AuthLambda/Code/Stage","constructInfo":{"fqn":"aws-cdk-lib.AssetStaging","version":"2.260.0"}},"AssetBucket":{"id":"AssetBucket","path":"snapshot-commerce-prod-auth-api/AuthLambda/Code/AssetBucket","constructInfo":{"fqn":"aws-cdk-lib.aws_s3.BucketBase","version":"2.260.0"}}}},"Resource":{"id":"Resource","path":"snapshot-commerce-prod-auth-api/AuthLambda/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnFunction","version":"2.260.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Function","aws:cdk:cloudformation:logicalId":"AuthLambda6BB8C88C","aws:cdk:cloudformation:props":{"architectures":["arm64"],"code":{"s3Bucket":"cdk-hnb659fds-assets-123456789012-us-east-1","s3Key":"530567cf1e6fd5236cd0e483ba02427949a4a68b619db930921f8d3ba9f03689.zip"},"environment":{"variables":{"DYNAMODB_TABLE_NAME":{"Fn::ImportValue":"snapshot-commerce-prod-auth-data:ExportsOutputRefAuthCraftTableDF046C42F3882570"},"NODE_ENV":"production","JWT_PRIVATE_KEY":"dummy","JWT_PUBLIC_KEY":"dummy","JWT_ALGORITHM":"EdDSA","JWT_ACCESS_TOKEN_AUDIENCE":"access","JWT_REFRESH_TOKEN_AUDIENCE":"refresh","GATEWAY_SECRET":"gw","AUTH_SYSTEM_NAME":"snapshot-commerce-prod-auth","APP_VERSION":"1.0.0","APP_URL":"","SUPPORT_EMAIL":"","ACCESS_TOKEN_LIFETIME_MINUTES":"15","REFRESH_TOKEN_LIFETIME_MINUTES":"10080","VERIFICATION_CODE_LIFETIME_MINUTES":"10","VERIFICATION_RESEND_COOLDOWN_SECONDS":"60","REFRESH_TOKEN_STRATEGY":"cookie","REFRESH_TOKEN_COOKIE_NAME":"refresh_token","REFRESH_TOKEN_COOKIE_HTTP_ONLY":"true","REFRESH_TOKEN_COOKIE_SECURE":"true","REFRESH_TOKEN_COOKIE_SAME_SITE":"strict","REFRESH_TOKEN_COOKIE_PATH":"/","REFRESH_COOKIE_CUSTOMER":"refresh_token","REFRESH_COOKIE_TENANT":"refresh_token_tenant","REFRESH_COOKIE_SYSTEM":"refresh_token_system","MAX_LOGIN_ATTEMPTS":"5","LOCKOUT_DURATION_MINUTES":"30","REQUIRE_VERIFIED_IDENTITY":"false","VERIFY_SESSION_ON_AUTH":"false","SYSTEM_TENANT_ID":"__system__","TOKEN_AUD_CUSTOMER":"customer","TOKEN_AUD_TENANT":"tenant","TOKEN_AUD_SYSTEM":"system","AUDIT_ENABLED":"false","DEVICE_TRACKING":"true","APP_BASE_PATH":"/api","EMAIL_MODE":"console","SMTP_MODE":"console"}},"functionName":"snapshot-commerce-prod-auth-api","handler":"index.handler","loggingConfig":{"logGroup":{"Ref":"AuthLambdaLogGroupF58ADE9F"}},"memorySize":256,"role":{"Fn::GetAtt":["AuthLambdaServiceRole7D6ECDEC","Arn"]},"runtime":"nodejs24.x","tags":[{"key":"Application","value":"AuthCraft"},{"key":"Environment","value":"prod"},{"key":"ManagedBy","value":"CDK"},{"key":"Project","value":"default"}],"timeout":30,"tracingConfig":{"mode":"Active"}}}},"FunctionUrl":{"id":"FunctionUrl","path":"snapshot-commerce-prod-auth-api/AuthLambda/FunctionUrl","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.FunctionUrl","version":"2.260.0"},"children":{"Resource":{"id":"Resource","path":"snapshot-commerce-prod-auth-api/AuthLambda/FunctionUrl/Resource","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnUrl","version":"2.260.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Url","aws:cdk:cloudformation:logicalId":"AuthLambdaFunctionUrl2F350878","aws:cdk:cloudformation:props":{"authType":"NONE","cors":{"allowHeaders":["*"],"allowMethods":["*"],"allowOrigins":["*"],"maxAge":3600},"targetFunctionArn":{"Fn::GetAtt":["AuthLambda6BB8C88C","Arn"]}}}}}},"invoke-function-url":{"id":"invoke-function-url","path":"snapshot-commerce-prod-auth-api/AuthLambda/invoke-function-url","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"2.260.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:logicalId":"AuthLambdainvokefunctionurl33671B00","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunctionUrl","functionName":{"Fn::GetAtt":["AuthLambda6BB8C88C","Arn"]},"functionUrlAuthType":"NONE","principal":"*"}}},"invoke-function":{"id":"invoke-function","path":"snapshot-commerce-prod-auth-api/AuthLambda/invoke-function","constructInfo":{"fqn":"aws-cdk-lib.aws_lambda.CfnPermission","version":"2.260.0"},"attributes":{"aws:cdk:cloudformation:type":"AWS::Lambda::Permission","aws:cdk:cloudformation:logicalId":"AuthLambdainvokefunction80F71BBA","aws:cdk:cloudformation:props":{"action":"lambda:InvokeFunction","functionName":{"Fn::GetAtt":["AuthLambda6BB8C88C","Arn"]},"invokedViaFunctionUrl":true,"principal":"*"}}}}},"LambdaFunctionUrl":{"id":"LambdaFunctionUrl","path":"snapshot-commerce-prod-auth-api/LambdaFunctionUrl","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.260.0"}},"LambdaFunctionArn":{"id":"LambdaFunctionArn","path":"snapshot-commerce-prod-auth-api/LambdaFunctionArn","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.260.0"}},"LambdaFunctionName":{"id":"LambdaFunctionName","path":"snapshot-commerce-prod-auth-api/LambdaFunctionName","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.260.0"}},"DynamoDBTableName":{"id":"DynamoDBTableName","path":"snapshot-commerce-prod-auth-api/DynamoDBTableName","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.260.0"}},"ApiBasePath":{"id":"ApiBasePath","path":"snapshot-commerce-prod-auth-api/ApiBasePath","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.260.0"}},"AuthSystemName":{"id":"AuthSystemName","path":"snapshot-commerce-prod-auth-api/AuthSystemName","constructInfo":{"fqn":"aws-cdk-lib.CfnOutput","version":"2.260.0"}},"CDKMetadata":{"id":"CDKMetadata","path":"snapshot-commerce-prod-auth-api/CDKMetadata","constructInfo":{"fqn":"constructs.Construct","version":"10.6.0"},"children":{"Default":{"id":"Default","path":"snapshot-commerce-prod-auth-api/CDKMetadata/Default","constructInfo":{"fqn":"aws-cdk-lib.CfnResource","version":"2.260.0"}}}},"BootstrapVersion":{"id":"BootstrapVersion","path":"snapshot-commerce-prod-auth-api/BootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnParameter","version":"2.260.0"}},"CheckBootstrapVersion":{"id":"CheckBootstrapVersion","path":"snapshot-commerce-prod-auth-api/CheckBootstrapVersion","constructInfo":{"fqn":"aws-cdk-lib.CfnRule","version":"2.260.0"}}}},"Tree":{"id":"Tree","path":"Tree","constructInfo":{"fqn":"constructs.Construct","version":"10.6.0"}}}}}
@@ -3,7 +3,7 @@ import * as dynamodb from 'aws-cdk-lib/aws-dynamodb';
3
3
  import type { Construct } from 'constructs';
4
4
 
5
5
  interface DynamoDBStackProps extends cdk.StackProps {
6
- resourceName: string; // e.g., "auth-craft-dev", "auth-craft-prod"
6
+ tableName: string; // {app}-{env}-{layer}-data, e.g. "snapshot-commerce-prod-auth-data"
7
7
  stage: string; // "dev" | "staging" | "prod" — passed from the app, single source of truth
8
8
  }
9
9
 
@@ -13,12 +13,10 @@ export class DynamoDBStack extends cdk.Stack {
13
13
  constructor(scope: Construct, id: string, props: DynamoDBStackProps) {
14
14
  super(scope, id, props);
15
15
 
16
- const { resourceName, stage } = props;
16
+ const { tableName, stage } = props;
17
17
 
18
- // Resource naming: {app}-{env}
19
- // Examples: auth-craft-dev, auth-craft-staging, auth-craft-prod
20
- // Multi-project: auth-craft-ecommerce-dev, auth-craft-saas-prod
21
- const tableName = resourceName;
18
+ // Table naming: {app}-{env}-{layer}-data
19
+ // Examples: snapshot-commerce-prod-auth-data, auth-craft-dev-auth-data
22
20
 
23
21
  this.table = new dynamodb.Table(this, 'AuthCraftTable', {
24
22
  tableName,
@@ -18,7 +18,8 @@ const LAMBDA_ASSET_DIR = path.resolve(__dirname, '../../assets/lambda');
18
18
 
19
19
  interface LambdaStackProps extends cdk.StackProps {
20
20
  table: dynamodb.ITable;
21
- resourceName: string; // e.g., "auth-craft-dev", "auth-craft-prod"
21
+ functionName: string; // {app}-{env}-{layer}-api, e.g. "snapshot-commerce-prod-auth-api"
22
+ resourceName: string; // base {app}-{env}-{layer} — AUTH_SYSTEM_NAME / JWT issuer (no component)
22
23
  stage: string; // "dev" | "staging" | "prod" — passed from the app, single source of truth
23
24
  }
24
25
 
@@ -30,7 +31,7 @@ export class LambdaStack extends cdk.Stack {
30
31
  constructor(scope: Construct, id: string, props: LambdaStackProps) {
31
32
  super(scope, id, props);
32
33
 
33
- const { resourceName, stage } = props;
34
+ const { resourceName, functionName, stage } = props;
34
35
 
35
36
  // API base path — obscures the Lambda route surface and is forwarded onto by
36
37
  // the gateway worker (BACKEND_URL = FunctionUrl + this path). It MUST be stable
@@ -89,12 +90,12 @@ export class LambdaStack extends cdk.Stack {
89
90
  }
90
91
  }
91
92
 
92
- // Resource naming: {app}-{env}
93
- // Examples: auth-craft-dev, auth-craft-staging, auth-craft-prod
93
+ // Naming: functionName = {app}-{env}-{layer}-api (the deployed resource);
94
+ // resourceName = {app}-{env}-{layer} base (AUTH_SYSTEM_NAME / JWT issuer).
94
95
 
95
- // Log group for Lambda function
96
+ // Log group for Lambda function (matches the function name)
96
97
  const logGroup = new logs.LogGroup(this, 'AuthLambdaLogGroup', {
97
- logGroupName: `/aws/lambda/${resourceName}`,
98
+ logGroupName: `/aws/lambda/${functionName}`,
98
99
  retention: logs.RetentionDays.ONE_MONTH,
99
100
  removalPolicy: stage === 'prod' ? cdk.RemovalPolicy.RETAIN : cdk.RemovalPolicy.DESTROY,
100
101
  });
@@ -105,9 +106,9 @@ export class LambdaStack extends cdk.Stack {
105
106
  // already-bundled assets/lambda/index.mjs — no monorepo / source needed.
106
107
  // The app build (esbuild, ESM, @aws-sdk/* external) emits `export const handler`
107
108
  // in index.mjs → handler 'index.handler'.
108
- // Function name: {app}-{env}
109
+ // Function name: {app}-{env}-{layer}-api
109
110
  this.lambdaFunction = new lambda.Function(this, 'AuthLambda', {
110
- functionName: resourceName,
111
+ functionName,
111
112
  code: lambda.Code.fromAsset(LAMBDA_ASSET_DIR),
112
113
  handler: 'index.handler',
113
114
  runtime: lambda.Runtime.NODEJS_24_X,