@openhi/constructs 0.0.116 → 0.0.117
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/lib/{chunk-X5MHU7DA.mjs → chunk-I7IIPV5X.mjs} +25 -5
- package/lib/chunk-I7IIPV5X.mjs.map +1 -0
- package/lib/data-store-postgres-replication.handler.js +24 -4
- package/lib/data-store-postgres-replication.handler.js.map +1 -1
- package/lib/data-store-postgres-replication.handler.mjs +1 -1
- package/lib/firehose-archive-transform.handler.js +24 -4
- package/lib/firehose-archive-transform.handler.js.map +1 -1
- package/lib/firehose-archive-transform.handler.mjs +1 -1
- package/lib/index.d.mts +21 -7
- package/lib/index.d.ts +21 -7
- package/lib/index.js +54 -44
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +59 -49
- package/lib/index.mjs.map +1 -1
- package/package.json +3 -3
- package/lib/chunk-X5MHU7DA.mjs.map +0 -1
package/lib/index.mjs
CHANGED
|
@@ -1176,7 +1176,9 @@ var WorkflowDedupConsumerNameInvalidError = class extends Error {
|
|
|
1176
1176
|
};
|
|
1177
1177
|
|
|
1178
1178
|
// src/components/event-bridge/data-event-bus.ts
|
|
1179
|
-
import {
|
|
1179
|
+
import { Duration as Duration2, Stack as Stack2 } from "aws-cdk-lib";
|
|
1180
|
+
import { Archive, EventBus } from "aws-cdk-lib/aws-events";
|
|
1181
|
+
var DEFAULT_ARCHIVE_RETENTION = Duration2.days(7);
|
|
1180
1182
|
var DataEventBus = class _DataEventBus extends EventBus {
|
|
1181
1183
|
/*****************************************************************************
|
|
1182
1184
|
*
|
|
@@ -1189,11 +1191,19 @@ var DataEventBus = class _DataEventBus extends EventBus {
|
|
|
1189
1191
|
const stack = OpenHiService.of(scope);
|
|
1190
1192
|
return `datav1${stack.branchHash}`;
|
|
1191
1193
|
}
|
|
1192
|
-
constructor(scope, props) {
|
|
1194
|
+
constructor(scope, props = void 0) {
|
|
1195
|
+
const { archiveRetention, ...busProps } = props ?? {};
|
|
1193
1196
|
super(scope, "data-event-bus-v1", {
|
|
1194
|
-
...
|
|
1197
|
+
...busProps,
|
|
1195
1198
|
eventBusName: _DataEventBus.getEventBusName(scope)
|
|
1196
1199
|
});
|
|
1200
|
+
this.replayArchive = new Archive(this, "Archive", {
|
|
1201
|
+
sourceEventBus: this,
|
|
1202
|
+
archiveName: `${_DataEventBus.getEventBusName(scope)}-archive`,
|
|
1203
|
+
description: "Replay archive for the OpenHI data event bus (data-store change notifications).",
|
|
1204
|
+
eventPattern: { account: [Stack2.of(this).account] },
|
|
1205
|
+
retention: archiveRetention ?? DEFAULT_ARCHIVE_RETENTION
|
|
1206
|
+
});
|
|
1197
1207
|
}
|
|
1198
1208
|
};
|
|
1199
1209
|
|
|
@@ -1244,7 +1254,7 @@ var ControlEventBus = class _ControlEventBus extends EventBus3 {
|
|
|
1244
1254
|
// src/components/postgres/data-store-postgres-replica.ts
|
|
1245
1255
|
import fs5 from "fs";
|
|
1246
1256
|
import path5 from "path";
|
|
1247
|
-
import { Duration as
|
|
1257
|
+
import { Duration as Duration3, Stack as Stack3 } from "aws-cdk-lib";
|
|
1248
1258
|
import * as ec2 from "aws-cdk-lib/aws-ec2";
|
|
1249
1259
|
import { Runtime as Runtime5, StartingPosition } from "aws-cdk-lib/aws-lambda";
|
|
1250
1260
|
import { KinesisEventSource } from "aws-cdk-lib/aws-lambda-event-sources";
|
|
@@ -1310,7 +1320,7 @@ var DataStorePostgresReplica = class extends Construct6 {
|
|
|
1310
1320
|
super(scope, id);
|
|
1311
1321
|
this.databaseName = props.databaseName ?? DEFAULT_DATABASE_NAME;
|
|
1312
1322
|
this.schemaName = getPostgresReplicaSchemaName(props.branchHash);
|
|
1313
|
-
const region =
|
|
1323
|
+
const region = Stack3.of(this).region;
|
|
1314
1324
|
this.vpc = props.vpc ?? new ec2.Vpc(this, "Vpc", {
|
|
1315
1325
|
availabilityZones: [`${region}a`, `${region}b`],
|
|
1316
1326
|
natGateways: 0,
|
|
@@ -1346,7 +1356,7 @@ var DataStorePostgresReplica = class extends Construct6 {
|
|
|
1346
1356
|
entry: resolveHandlerEntry5(__dirname),
|
|
1347
1357
|
runtime: Runtime5.NODEJS_LATEST,
|
|
1348
1358
|
memorySize: 512,
|
|
1349
|
-
timeout:
|
|
1359
|
+
timeout: Duration3.minutes(1),
|
|
1350
1360
|
vpc: this.vpc,
|
|
1351
1361
|
vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE_ISOLATED },
|
|
1352
1362
|
description: "Replicates DynamoDB current-resource changes into the Postgres `resources` JSONB table (ADR 2026-04-17-01).",
|
|
@@ -1373,7 +1383,7 @@ var DataStorePostgresReplica = class extends Construct6 {
|
|
|
1373
1383
|
new KinesisEventSource(props.kinesisStream, {
|
|
1374
1384
|
startingPosition: StartingPosition.LATEST,
|
|
1375
1385
|
batchSize: 100,
|
|
1376
|
-
maxBatchingWindow:
|
|
1386
|
+
maxBatchingWindow: Duration3.seconds(5),
|
|
1377
1387
|
retryAttempts: 10,
|
|
1378
1388
|
bisectBatchOnError: true,
|
|
1379
1389
|
parallelizationFactor: 2,
|
|
@@ -1406,7 +1416,7 @@ var DataStorePostgresReplica = class extends Construct6 {
|
|
|
1406
1416
|
};
|
|
1407
1417
|
|
|
1408
1418
|
// src/components/route-53/child-hosted-zone.ts
|
|
1409
|
-
import { Duration as
|
|
1419
|
+
import { Duration as Duration4 } from "aws-cdk-lib";
|
|
1410
1420
|
import {
|
|
1411
1421
|
HostedZone,
|
|
1412
1422
|
NsRecord
|
|
@@ -1418,7 +1428,7 @@ var ChildHostedZone = class extends HostedZone {
|
|
|
1418
1428
|
zone: props.parentHostedZone,
|
|
1419
1429
|
recordName: this.zoneName,
|
|
1420
1430
|
values: this.hostedZoneNameServers || [],
|
|
1421
|
-
ttl:
|
|
1431
|
+
ttl: Duration4.minutes(5)
|
|
1422
1432
|
});
|
|
1423
1433
|
}
|
|
1424
1434
|
};
|
|
@@ -1441,7 +1451,7 @@ import { Construct as Construct9 } from "constructs";
|
|
|
1441
1451
|
// src/components/static-hosting/static-hosting.ts
|
|
1442
1452
|
import * as fs6 from "fs";
|
|
1443
1453
|
import * as path6 from "path";
|
|
1444
|
-
import { Duration as
|
|
1454
|
+
import { Duration as Duration5 } from "aws-cdk-lib";
|
|
1445
1455
|
import {
|
|
1446
1456
|
AccessLevel,
|
|
1447
1457
|
AllowedMethods,
|
|
@@ -1507,9 +1517,9 @@ var _StaticHosting = class _StaticHosting extends Construct8 {
|
|
|
1507
1517
|
const cachePolicy = new CachePolicy(this, "cache-policy", {
|
|
1508
1518
|
cachePolicyName: `static-hosting-${stack.branchHash}`,
|
|
1509
1519
|
comment: "Static hosting default: 60s default / 300s max, gzip+brotli.",
|
|
1510
|
-
defaultTtl:
|
|
1511
|
-
minTtl:
|
|
1512
|
-
maxTtl:
|
|
1520
|
+
defaultTtl: Duration5.seconds(60),
|
|
1521
|
+
minTtl: Duration5.seconds(0),
|
|
1522
|
+
maxTtl: Duration5.seconds(300),
|
|
1513
1523
|
headerBehavior: CacheHeaderBehavior.none(),
|
|
1514
1524
|
queryStringBehavior: CacheQueryStringBehavior.none(),
|
|
1515
1525
|
cookieBehavior: CacheCookieBehavior.none(),
|
|
@@ -1642,7 +1652,7 @@ import {
|
|
|
1642
1652
|
} from "aws-cdk-lib/aws-cognito";
|
|
1643
1653
|
import { Effect as Effect6, PolicyStatement as PolicyStatement6 } from "aws-cdk-lib/aws-iam";
|
|
1644
1654
|
import { Key as Key2 } from "aws-cdk-lib/aws-kms";
|
|
1645
|
-
import { Stack as
|
|
1655
|
+
import { Stack as Stack7 } from "aws-cdk-lib/core";
|
|
1646
1656
|
|
|
1647
1657
|
// src/services/open-hi-data-service.ts
|
|
1648
1658
|
var import_config4 = __toESM(require_lib2());
|
|
@@ -1666,7 +1676,7 @@ import { Construct as Construct11 } from "constructs";
|
|
|
1666
1676
|
// src/workflows/control-plane/platform-deploy-bridge/platform-deploy-bridge-lambda.ts
|
|
1667
1677
|
import fs7 from "fs";
|
|
1668
1678
|
import path7 from "path";
|
|
1669
|
-
import { Duration as
|
|
1679
|
+
import { Duration as Duration6, Stack as Stack4 } from "aws-cdk-lib";
|
|
1670
1680
|
import { Rule } from "aws-cdk-lib/aws-events";
|
|
1671
1681
|
import { LambdaFunction } from "aws-cdk-lib/aws-events-targets";
|
|
1672
1682
|
import { Effect as Effect2, PolicyStatement as PolicyStatement2 } from "aws-cdk-lib/aws-iam";
|
|
@@ -1690,15 +1700,15 @@ var PlatformDeployBridgeLambda = class extends Construct10 {
|
|
|
1690
1700
|
OPENHI_TAG_SUFFIX_REPO_NAME
|
|
1691
1701
|
);
|
|
1692
1702
|
const tagKeyPrefix = `${service.appName}:`;
|
|
1693
|
-
const ownStackName =
|
|
1694
|
-
const ownSuffix = `-${service.serviceId}-${
|
|
1703
|
+
const ownStackName = Stack4.of(this).stackName;
|
|
1704
|
+
const ownSuffix = `-${service.serviceId}-${Stack4.of(this).account}-${Stack4.of(this).region}`;
|
|
1695
1705
|
const sharedPrefix = ownStackName.endsWith(ownSuffix) ? ownStackName.slice(0, -ownSuffix.length) : service.branchHash;
|
|
1696
|
-
const stackIdPrefix = `arn:aws:cloudformation:${
|
|
1706
|
+
const stackIdPrefix = `arn:aws:cloudformation:${Stack4.of(this).region}:${Stack4.of(this).account}:stack/${sharedPrefix}-`;
|
|
1697
1707
|
this.lambda = new NodejsFunction7(this, "handler", {
|
|
1698
1708
|
entry: resolveHandlerEntry6(__dirname),
|
|
1699
1709
|
runtime: Runtime7.NODEJS_LATEST,
|
|
1700
1710
|
memorySize: 256,
|
|
1701
|
-
timeout:
|
|
1711
|
+
timeout: Duration6.seconds(30),
|
|
1702
1712
|
environment: {
|
|
1703
1713
|
[CONTROL_EVENT_BUS_NAME_ENV_VAR]: props.controlEventBus.eventBusName,
|
|
1704
1714
|
[OPENHI_REPO_TAG_KEY_ENV_VAR]: repoTagKey,
|
|
@@ -1710,7 +1720,7 @@ var PlatformDeployBridgeLambda = class extends Construct10 {
|
|
|
1710
1720
|
effect: Effect2.ALLOW,
|
|
1711
1721
|
actions: ["cloudformation:DescribeStacks"],
|
|
1712
1722
|
resources: [
|
|
1713
|
-
`arn:aws:cloudformation:${
|
|
1723
|
+
`arn:aws:cloudformation:${Stack4.of(this).region}:${Stack4.of(this).account}:stack/*`
|
|
1714
1724
|
]
|
|
1715
1725
|
})
|
|
1716
1726
|
);
|
|
@@ -1729,7 +1739,7 @@ var PlatformDeployBridgeLambda = class extends Construct10 {
|
|
|
1729
1739
|
targets: [
|
|
1730
1740
|
new LambdaFunction(this.lambda, {
|
|
1731
1741
|
retryAttempts: 2,
|
|
1732
|
-
maxEventAge:
|
|
1742
|
+
maxEventAge: Duration6.hours(2)
|
|
1733
1743
|
})
|
|
1734
1744
|
]
|
|
1735
1745
|
});
|
|
@@ -1932,7 +1942,7 @@ var OpenHiGlobalService = _OpenHiGlobalService;
|
|
|
1932
1942
|
// src/workflows/control-plane/seed-demo-data/seed-demo-data-lambda.ts
|
|
1933
1943
|
import fs8 from "fs";
|
|
1934
1944
|
import path8 from "path";
|
|
1935
|
-
import { Duration as
|
|
1945
|
+
import { Duration as Duration7, Stack as Stack5 } from "aws-cdk-lib";
|
|
1936
1946
|
import { Rule as Rule2 } from "aws-cdk-lib/aws-events";
|
|
1937
1947
|
import { LambdaFunction as LambdaFunction2 } from "aws-cdk-lib/aws-events-targets";
|
|
1938
1948
|
import { Effect as Effect3, PolicyStatement as PolicyStatement3 } from "aws-cdk-lib/aws-iam";
|
|
@@ -1954,7 +1964,7 @@ var SeedDemoDataLambda = class extends Construct12 {
|
|
|
1954
1964
|
entry: resolveHandlerEntry7(__dirname),
|
|
1955
1965
|
runtime: Runtime8.NODEJS_LATEST,
|
|
1956
1966
|
memorySize: 512,
|
|
1957
|
-
timeout:
|
|
1967
|
+
timeout: Duration7.minutes(2),
|
|
1958
1968
|
environment: {
|
|
1959
1969
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName,
|
|
1960
1970
|
[SEED_DEMO_DATA_USER_POOL_ID_ENV_VAR]: props.userPool.userPoolId
|
|
@@ -1983,7 +1993,7 @@ var SeedDemoDataLambda = class extends Construct12 {
|
|
|
1983
1993
|
"cognito-idp:AdminSetUserPassword"
|
|
1984
1994
|
],
|
|
1985
1995
|
resources: [
|
|
1986
|
-
|
|
1996
|
+
Stack5.of(this).formatArn({
|
|
1987
1997
|
service: "cognito-idp",
|
|
1988
1998
|
resource: "userpool",
|
|
1989
1999
|
resourceName: props.userPool.userPoolId
|
|
@@ -2000,7 +2010,7 @@ var SeedDemoDataLambda = class extends Construct12 {
|
|
|
2000
2010
|
targets: [
|
|
2001
2011
|
new LambdaFunction2(this.lambda, {
|
|
2002
2012
|
retryAttempts: 2,
|
|
2003
|
-
maxEventAge:
|
|
2013
|
+
maxEventAge: Duration7.hours(2)
|
|
2004
2014
|
})
|
|
2005
2015
|
]
|
|
2006
2016
|
});
|
|
@@ -2029,7 +2039,7 @@ var SeedDemoDataWorkflow = class extends Construct13 {
|
|
|
2029
2039
|
import fs9 from "fs";
|
|
2030
2040
|
import path9 from "path";
|
|
2031
2041
|
import { PLATFORM_ROLE_IDS } from "@openhi/types";
|
|
2032
|
-
import { Duration as
|
|
2042
|
+
import { Duration as Duration8, Stack as Stack6 } from "aws-cdk-lib";
|
|
2033
2043
|
import { Rule as Rule3 } from "aws-cdk-lib/aws-events";
|
|
2034
2044
|
import { LambdaFunction as LambdaFunction3 } from "aws-cdk-lib/aws-events-targets";
|
|
2035
2045
|
import { Effect as Effect4, PolicyStatement as PolicyStatement4 } from "aws-cdk-lib/aws-iam";
|
|
@@ -2051,7 +2061,7 @@ var SeedSystemDataLambda = class extends Construct14 {
|
|
|
2051
2061
|
entry: resolveHandlerEntry8(__dirname),
|
|
2052
2062
|
runtime: Runtime9.NODEJS_LATEST,
|
|
2053
2063
|
memorySize: 512,
|
|
2054
|
-
timeout:
|
|
2064
|
+
timeout: Duration8.minutes(1),
|
|
2055
2065
|
environment: {
|
|
2056
2066
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName,
|
|
2057
2067
|
[SEED_SYSTEM_DATA_CONTROL_BUS_ENV_VAR]: props.controlEventBus.eventBusName
|
|
@@ -2073,7 +2083,7 @@ var SeedSystemDataLambda = class extends Construct14 {
|
|
|
2073
2083
|
})
|
|
2074
2084
|
);
|
|
2075
2085
|
props.controlEventBus.grantPutEventsTo(this.lambda);
|
|
2076
|
-
const hostStackName =
|
|
2086
|
+
const hostStackName = Stack6.of(this).stackName;
|
|
2077
2087
|
this.rule = new Rule3(this, "rule", {
|
|
2078
2088
|
eventBus: props.controlEventBus,
|
|
2079
2089
|
eventPattern: {
|
|
@@ -2088,7 +2098,7 @@ var SeedSystemDataLambda = class extends Construct14 {
|
|
|
2088
2098
|
targets: [
|
|
2089
2099
|
new LambdaFunction3(this.lambda, {
|
|
2090
2100
|
retryAttempts: 2,
|
|
2091
|
-
maxEventAge:
|
|
2101
|
+
maxEventAge: Duration8.hours(2)
|
|
2092
2102
|
})
|
|
2093
2103
|
]
|
|
2094
2104
|
});
|
|
@@ -2225,7 +2235,7 @@ var OpenHiDataService = _OpenHiDataService;
|
|
|
2225
2235
|
// src/workflows/control-plane/user-onboarding/provision-default-workspace-lambda.ts
|
|
2226
2236
|
import fs10 from "fs";
|
|
2227
2237
|
import path10 from "path";
|
|
2228
|
-
import { Duration as
|
|
2238
|
+
import { Duration as Duration9 } from "aws-cdk-lib";
|
|
2229
2239
|
import { Rule as Rule4 } from "aws-cdk-lib/aws-events";
|
|
2230
2240
|
import { LambdaFunction as LambdaFunction4 } from "aws-cdk-lib/aws-events-targets";
|
|
2231
2241
|
import { Effect as Effect5, PolicyStatement as PolicyStatement5 } from "aws-cdk-lib/aws-iam";
|
|
@@ -2272,7 +2282,7 @@ var ProvisionDefaultWorkspaceLambda = class extends Construct16 {
|
|
|
2272
2282
|
targets: [
|
|
2273
2283
|
new LambdaFunction4(this.lambda, {
|
|
2274
2284
|
retryAttempts: 2,
|
|
2275
|
-
maxEventAge:
|
|
2285
|
+
maxEventAge: Duration9.hours(2)
|
|
2276
2286
|
})
|
|
2277
2287
|
]
|
|
2278
2288
|
});
|
|
@@ -2499,7 +2509,7 @@ var _OpenHiAuthService = class _OpenHiAuthService extends OpenHiService {
|
|
|
2499
2509
|
new PolicyStatement6({
|
|
2500
2510
|
actions: ["cognito-idp:AdminUserGlobalSignOut"],
|
|
2501
2511
|
resources: [
|
|
2502
|
-
|
|
2512
|
+
Stack7.of(this).formatArn({
|
|
2503
2513
|
service: "cognito-idp",
|
|
2504
2514
|
resource: "userpool",
|
|
2505
2515
|
resourceName: "*"
|
|
@@ -2573,7 +2583,7 @@ import {
|
|
|
2573
2583
|
RecordTarget as RecordTarget2
|
|
2574
2584
|
} from "aws-cdk-lib/aws-route53";
|
|
2575
2585
|
import { ApiGatewayv2DomainProperties } from "aws-cdk-lib/aws-route53-targets";
|
|
2576
|
-
import { Duration as
|
|
2586
|
+
import { Duration as Duration10 } from "aws-cdk-lib/core";
|
|
2577
2587
|
|
|
2578
2588
|
// src/data/lambda/cors-options-lambda.ts
|
|
2579
2589
|
import fs11 from "fs";
|
|
@@ -2880,7 +2890,7 @@ var _OpenHiRestApiService = class _OpenHiRestApiService extends OpenHiService {
|
|
|
2880
2890
|
"Authorization"
|
|
2881
2891
|
],
|
|
2882
2892
|
allowCredentials: cors.allowCredentials ?? true,
|
|
2883
|
-
maxAge: cors.maxAge ??
|
|
2893
|
+
maxAge: cors.maxAge ?? Duration10.days(1),
|
|
2884
2894
|
...cors.exposeHeaders !== void 0 && {
|
|
2885
2895
|
exposeHeaders: cors.exposeHeaders
|
|
2886
2896
|
}
|
|
@@ -3100,7 +3110,7 @@ var OpenHiWebsiteService = _OpenHiWebsiteService;
|
|
|
3100
3110
|
// src/workflows/control-plane/owning-delete-cascade/owning-delete-cascade-lambdas.ts
|
|
3101
3111
|
import fs13 from "fs";
|
|
3102
3112
|
import path13 from "path";
|
|
3103
|
-
import { Duration as
|
|
3113
|
+
import { Duration as Duration11 } from "aws-cdk-lib";
|
|
3104
3114
|
import { Effect as Effect8, PolicyStatement as PolicyStatement8 } from "aws-cdk-lib/aws-iam";
|
|
3105
3115
|
import { Runtime as Runtime13 } from "aws-cdk-lib/aws-lambda";
|
|
3106
3116
|
import { NodejsFunction as NodejsFunction13 } from "aws-cdk-lib/aws-lambda-nodejs";
|
|
@@ -3124,7 +3134,7 @@ var OwningDeleteCascadeLambdas = class extends Construct20 {
|
|
|
3124
3134
|
entry: listResolved.entry,
|
|
3125
3135
|
runtime: Runtime13.NODEJS_LATEST,
|
|
3126
3136
|
memorySize: 512,
|
|
3127
|
-
timeout:
|
|
3137
|
+
timeout: Duration11.minutes(1),
|
|
3128
3138
|
environment: {
|
|
3129
3139
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
|
|
3130
3140
|
}
|
|
@@ -3138,7 +3148,7 @@ var OwningDeleteCascadeLambdas = class extends Construct20 {
|
|
|
3138
3148
|
entry: deleteResolved.entry,
|
|
3139
3149
|
runtime: Runtime13.NODEJS_LATEST,
|
|
3140
3150
|
memorySize: 512,
|
|
3141
|
-
timeout:
|
|
3151
|
+
timeout: Duration11.minutes(1),
|
|
3142
3152
|
environment: {
|
|
3143
3153
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
|
|
3144
3154
|
}
|
|
@@ -3157,7 +3167,7 @@ var OwningDeleteCascadeLambdas = class extends Construct20 {
|
|
|
3157
3167
|
entry: finalizeResolved.entry,
|
|
3158
3168
|
runtime: Runtime13.NODEJS_LATEST,
|
|
3159
3169
|
memorySize: 512,
|
|
3160
|
-
timeout:
|
|
3170
|
+
timeout: Duration11.minutes(1),
|
|
3161
3171
|
environment: {
|
|
3162
3172
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName,
|
|
3163
3173
|
[OWNING_DELETE_OPS_EVENT_BUS_ENV_VAR]: props.opsEventBus.eventBusName
|
|
@@ -3175,7 +3185,7 @@ var OwningDeleteCascadeLambdas = class extends Construct20 {
|
|
|
3175
3185
|
};
|
|
3176
3186
|
|
|
3177
3187
|
// src/workflows/control-plane/owning-delete-cascade/owning-delete-cascade-workflow.ts
|
|
3178
|
-
import { Duration as
|
|
3188
|
+
import { Duration as Duration12 } from "aws-cdk-lib";
|
|
3179
3189
|
import { Rule as Rule5 } from "aws-cdk-lib/aws-events";
|
|
3180
3190
|
import { SfnStateMachine } from "aws-cdk-lib/aws-events-targets";
|
|
3181
3191
|
import {
|
|
@@ -3301,7 +3311,7 @@ var OwningDeleteCascadeWorkflow = class extends Construct21 {
|
|
|
3301
3311
|
}
|
|
3302
3312
|
});
|
|
3303
3313
|
const interPageWait = new Wait(this, "inter-page-wait", {
|
|
3304
|
-
time: WaitTime.duration(
|
|
3314
|
+
time: WaitTime.duration(Duration12.seconds(0))
|
|
3305
3315
|
});
|
|
3306
3316
|
const isExhausted = new Choice(this, "is-exhausted");
|
|
3307
3317
|
const finalize = new LambdaInvoke(this, "finalize", {
|
|
@@ -3332,7 +3342,7 @@ var OwningDeleteCascadeWorkflow = class extends Construct21 {
|
|
|
3332
3342
|
// Long timeout because real-world cascades can run minutes when
|
|
3333
3343
|
// a workspace has thousands of members. The stuck-cascade alarm
|
|
3334
3344
|
// fires at 15 minutes; the state machine itself does not abort.
|
|
3335
|
-
timeout:
|
|
3345
|
+
timeout: Duration12.hours(2)
|
|
3336
3346
|
});
|
|
3337
3347
|
this.rule = new Rule5(this, "rule", {
|
|
3338
3348
|
eventBus: props.dataEventBus,
|
|
@@ -3343,7 +3353,7 @@ var OwningDeleteCascadeWorkflow = class extends Construct21 {
|
|
|
3343
3353
|
targets: [
|
|
3344
3354
|
new SfnStateMachine(this.stateMachine, {
|
|
3345
3355
|
retryAttempts: 2,
|
|
3346
|
-
maxEventAge:
|
|
3356
|
+
maxEventAge: Duration12.hours(2)
|
|
3347
3357
|
})
|
|
3348
3358
|
]
|
|
3349
3359
|
});
|
|
@@ -3353,7 +3363,7 @@ var OwningDeleteCascadeWorkflow = class extends Construct21 {
|
|
|
3353
3363
|
// src/workflows/control-plane/rename-cascade/rename-cascade-lambdas.ts
|
|
3354
3364
|
import fs14 from "fs";
|
|
3355
3365
|
import path14 from "path";
|
|
3356
|
-
import { Duration as
|
|
3366
|
+
import { Duration as Duration13 } from "aws-cdk-lib";
|
|
3357
3367
|
import { Effect as Effect9, PolicyStatement as PolicyStatement9 } from "aws-cdk-lib/aws-iam";
|
|
3358
3368
|
import { Runtime as Runtime14 } from "aws-cdk-lib/aws-lambda";
|
|
3359
3369
|
import { NodejsFunction as NodejsFunction14 } from "aws-cdk-lib/aws-lambda-nodejs";
|
|
@@ -3377,7 +3387,7 @@ var RenameCascadeLambdas = class extends Construct22 {
|
|
|
3377
3387
|
entry: listResolved.entry,
|
|
3378
3388
|
runtime: Runtime14.NODEJS_LATEST,
|
|
3379
3389
|
memorySize: 512,
|
|
3380
|
-
timeout:
|
|
3390
|
+
timeout: Duration13.minutes(1),
|
|
3381
3391
|
environment: {
|
|
3382
3392
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
|
|
3383
3393
|
}
|
|
@@ -3391,7 +3401,7 @@ var RenameCascadeLambdas = class extends Construct22 {
|
|
|
3391
3401
|
entry: rewriteResolved.entry,
|
|
3392
3402
|
runtime: Runtime14.NODEJS_LATEST,
|
|
3393
3403
|
memorySize: 512,
|
|
3394
|
-
timeout:
|
|
3404
|
+
timeout: Duration13.minutes(1),
|
|
3395
3405
|
environment: {
|
|
3396
3406
|
DYNAMO_TABLE_NAME: props.dataStoreTable.tableName
|
|
3397
3407
|
}
|
|
@@ -3410,7 +3420,7 @@ var RenameCascadeLambdas = class extends Construct22 {
|
|
|
3410
3420
|
entry: finalizeResolved.entry,
|
|
3411
3421
|
runtime: Runtime14.NODEJS_LATEST,
|
|
3412
3422
|
memorySize: 512,
|
|
3413
|
-
timeout:
|
|
3423
|
+
timeout: Duration13.minutes(1),
|
|
3414
3424
|
environment: {
|
|
3415
3425
|
[RENAME_CASCADE_OPS_EVENT_BUS_ENV_VAR]: props.opsEventBus.eventBusName
|
|
3416
3426
|
}
|
|
@@ -3426,7 +3436,7 @@ var RenameCascadeLambdas = class extends Construct22 {
|
|
|
3426
3436
|
};
|
|
3427
3437
|
|
|
3428
3438
|
// src/workflows/control-plane/rename-cascade/rename-cascade-workflow.ts
|
|
3429
|
-
import { Duration as
|
|
3439
|
+
import { Duration as Duration14 } from "aws-cdk-lib";
|
|
3430
3440
|
import { Rule as Rule6 } from "aws-cdk-lib/aws-events";
|
|
3431
3441
|
import { SfnStateMachine as SfnStateMachine2 } from "aws-cdk-lib/aws-events-targets";
|
|
3432
3442
|
import {
|
|
@@ -3585,7 +3595,7 @@ var RenameCascadeWorkflow = class extends Construct23 {
|
|
|
3585
3595
|
// Long timeout — large renames may rewrite thousands of rows;
|
|
3586
3596
|
// the `CascadeSlow` alarm fires at 300s p99 but the state
|
|
3587
3597
|
// machine itself does not abort.
|
|
3588
|
-
timeout:
|
|
3598
|
+
timeout: Duration14.hours(2)
|
|
3589
3599
|
});
|
|
3590
3600
|
this.rule = new Rule6(this, "rule", {
|
|
3591
3601
|
eventBus: props.dataEventBus,
|
|
@@ -3596,7 +3606,7 @@ var RenameCascadeWorkflow = class extends Construct23 {
|
|
|
3596
3606
|
targets: [
|
|
3597
3607
|
new SfnStateMachine2(this.stateMachine, {
|
|
3598
3608
|
retryAttempts: 2,
|
|
3599
|
-
maxEventAge:
|
|
3609
|
+
maxEventAge: Duration14.hours(2)
|
|
3600
3610
|
})
|
|
3601
3611
|
]
|
|
3602
3612
|
});
|