sst 2.45.2 → 2.47.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.
- package/bootstrap.js +2 -2
- package/constructs/EdgeFunction.js +4 -6
- package/constructs/EventBus.js +1 -1
- package/constructs/Function.d.ts +2 -2
- package/constructs/Function.js +5 -5
- package/constructs/Job.js +1 -1
- package/constructs/NextjsSite.js +3 -3
- package/constructs/RDS.js +1 -1
- package/constructs/Script.js +1 -1
- package/constructs/SsrFunction.js +1 -3
- package/constructs/SsrSite.js +1 -1
- package/constructs/Stack.js +1 -1
- package/constructs/cdk/dns-validated-certificate.js +1 -1
- package/constructs/deprecated/NextjsSite.js +0 -3
- package/constructs/deprecated/cross-region-helper.js +3 -3
- package/package.json +2 -2
- package/support/bootstrap-metadata-function/index.mjs +1408 -1160
- package/support/bridge/live-lambda.mjs +66 -66
- package/support/custom-resources/index.mjs +4662 -3693
- package/support/event-bus-retrier/index.mjs +44 -44
- package/support/job-manager/index.mjs +1544 -1258
package/bootstrap.js
CHANGED
|
@@ -206,8 +206,8 @@ export async function bootstrapSST(cdkBucket) {
|
|
|
206
206
|
code: Code.fromAsset(path.resolve(__dirname, "support/bootstrap-metadata-function")),
|
|
207
207
|
handler: "index.handler",
|
|
208
208
|
runtime: region?.startsWith("us-gov-")
|
|
209
|
-
? Runtime.
|
|
210
|
-
: Runtime.
|
|
209
|
+
? Runtime.NODEJS_22_X
|
|
210
|
+
: Runtime.NODEJS_22_X,
|
|
211
211
|
environment: {
|
|
212
212
|
BUCKET_NAME: bucket.bucketName,
|
|
213
213
|
},
|
|
@@ -283,7 +283,7 @@ export class EdgeFunction extends Construct {
|
|
|
283
283
|
const provider = new CdkFunction(stack, providerId, {
|
|
284
284
|
code: Code.fromAsset(path.join(__dirname, "../support/edge-function")),
|
|
285
285
|
handler: "s3-bucket.handler",
|
|
286
|
-
runtime: Runtime.
|
|
286
|
+
runtime: Runtime.NODEJS_22_X,
|
|
287
287
|
timeout: CdkDuration.minutes(15),
|
|
288
288
|
memorySize: 1024,
|
|
289
289
|
initialPolicy: [
|
|
@@ -316,7 +316,7 @@ export class EdgeFunction extends Construct {
|
|
|
316
316
|
provider = new CdkFunction(stack, providerId, {
|
|
317
317
|
code: Code.fromAsset(path.join(__dirname, "../support/edge-function")),
|
|
318
318
|
handler: "edge-lambda.handler",
|
|
319
|
-
runtime: Runtime.
|
|
319
|
+
runtime: Runtime.NODEJS_22_X,
|
|
320
320
|
timeout: CdkDuration.minutes(15),
|
|
321
321
|
memorySize: 1024,
|
|
322
322
|
initialPolicy: [
|
|
@@ -349,9 +349,7 @@ export class EdgeFunction extends Construct {
|
|
|
349
349
|
? Runtime.NODEJS_22_X.name
|
|
350
350
|
: runtime === "nodejs20.x"
|
|
351
351
|
? Runtime.NODEJS_20_X.name
|
|
352
|
-
:
|
|
353
|
-
? Runtime.NODEJS_16_X.name
|
|
354
|
-
: Runtime.NODEJS_18_X.name,
|
|
352
|
+
: Runtime.NODEJS_18_X.name,
|
|
355
353
|
MemorySize: typeof memorySize === "string"
|
|
356
354
|
? toCdkSize(memorySize).toMebibytes()
|
|
357
355
|
: memorySize,
|
|
@@ -382,7 +380,7 @@ export class EdgeFunction extends Construct {
|
|
|
382
380
|
provider = new CdkFunction(stack, providerId, {
|
|
383
381
|
code: Code.fromAsset(path.join(__dirname, "../support/edge-function")),
|
|
384
382
|
handler: "edge-lambda-version.handler",
|
|
385
|
-
runtime: Runtime.
|
|
383
|
+
runtime: Runtime.NODEJS_22_X,
|
|
386
384
|
timeout: CdkDuration.minutes(15),
|
|
387
385
|
memorySize: 1024,
|
|
388
386
|
initialPolicy: [
|
package/constructs/EventBus.js
CHANGED
|
@@ -248,7 +248,7 @@ export class EventBus extends Construct {
|
|
|
248
248
|
});
|
|
249
249
|
this.retrierFn = new lambda.Function(this, `RetrierFunction`, {
|
|
250
250
|
functionName: app.logicalPrefixedName(this.node.id + "Retrier"),
|
|
251
|
-
runtime: lambda.Runtime.
|
|
251
|
+
runtime: lambda.Runtime.NODEJS_22_X,
|
|
252
252
|
timeout: Duration.seconds(30),
|
|
253
253
|
handler: "index.handler",
|
|
254
254
|
code: lambda.Code.fromAsset(path.join(__dirname, "../support/event-bus-retrier")),
|
package/constructs/Function.d.ts
CHANGED
|
@@ -148,12 +148,12 @@ export interface FunctionProps extends Omit<FunctionOptions, "functionName" | "m
|
|
|
148
148
|
handler?: string;
|
|
149
149
|
/**
|
|
150
150
|
* The runtime environment for the function.
|
|
151
|
-
* @default "
|
|
151
|
+
* @default "nodejs22.x"
|
|
152
152
|
* @example
|
|
153
153
|
* ```js
|
|
154
154
|
* new Function(stack, "Function", {
|
|
155
155
|
* handler: "function.handler",
|
|
156
|
-
* runtime: "
|
|
156
|
+
* runtime: "nodejs20.x",
|
|
157
157
|
* })
|
|
158
158
|
*```
|
|
159
159
|
*/
|
package/constructs/Function.js
CHANGED
|
@@ -88,7 +88,7 @@ export class Function extends CDKFunction {
|
|
|
88
88
|
.forEach((per) => {
|
|
89
89
|
props = Function.mergeProps(per, props);
|
|
90
90
|
});
|
|
91
|
-
props.runtime = props.runtime || "
|
|
91
|
+
props.runtime = props.runtime || "nodejs22.x";
|
|
92
92
|
if (props.runtime === "go1.x")
|
|
93
93
|
useWarning().add("go.deprecated");
|
|
94
94
|
// Set defaults
|
|
@@ -122,7 +122,7 @@ export class Function extends CDKFunction {
|
|
|
122
122
|
code: Code.fromInline("export function placeholder() {}"),
|
|
123
123
|
handler: "index.placeholder",
|
|
124
124
|
functionName,
|
|
125
|
-
runtime: CDKRuntime.
|
|
125
|
+
runtime: CDKRuntime.NODEJS_22_X,
|
|
126
126
|
memorySize,
|
|
127
127
|
ephemeralStorageSize: diskSize,
|
|
128
128
|
timeout,
|
|
@@ -171,7 +171,7 @@ export class Function extends CDKFunction {
|
|
|
171
171
|
}
|
|
172
172
|
: {
|
|
173
173
|
description,
|
|
174
|
-
runtime: CDKRuntime.
|
|
174
|
+
runtime: CDKRuntime.NODEJS_22_X,
|
|
175
175
|
code: Code.fromAsset(path.resolve(__dirname, "../support/bridge")),
|
|
176
176
|
handler: "live-lambda.handler",
|
|
177
177
|
layers: [],
|
|
@@ -216,13 +216,13 @@ export class Function extends CDKFunction {
|
|
|
216
216
|
? {
|
|
217
217
|
code: Code.fromInline("export function placeholder() {}"),
|
|
218
218
|
handler: "index.placeholder",
|
|
219
|
-
runtime: CDKRuntime.
|
|
219
|
+
runtime: CDKRuntime.NODEJS_22_X,
|
|
220
220
|
layers: undefined,
|
|
221
221
|
}
|
|
222
222
|
: {
|
|
223
223
|
code: Code.fromInline("export function placeholder() {}"),
|
|
224
224
|
handler: "index.placeholder",
|
|
225
|
-
runtime: CDKRuntime.
|
|
225
|
+
runtime: CDKRuntime.NODEJS_22_X,
|
|
226
226
|
layers: Function.buildLayers(scope, id, props),
|
|
227
227
|
}),
|
|
228
228
|
architecture,
|
package/constructs/Job.js
CHANGED
|
@@ -329,7 +329,7 @@ export class Job extends Construct {
|
|
|
329
329
|
return new CdkFunction(this, "Manager", {
|
|
330
330
|
code: Code.fromAsset(path.join(__dirname, "../support/job-manager/")),
|
|
331
331
|
handler: "index.handler",
|
|
332
|
-
runtime: Runtime.
|
|
332
|
+
runtime: Runtime.NODEJS_22_X,
|
|
333
333
|
timeout: CdkDuration.seconds(10),
|
|
334
334
|
memorySize: 1024,
|
|
335
335
|
environment: {
|
package/constructs/NextjsSite.js
CHANGED
|
@@ -156,7 +156,7 @@ export class NextjsSite extends SsrSite {
|
|
|
156
156
|
description: "Next.js Image Optimization Function",
|
|
157
157
|
handler: imageOpt.handler,
|
|
158
158
|
code: Code.fromAsset(path.join(sitePath, imageOpt.bundle)),
|
|
159
|
-
runtime: Runtime.
|
|
159
|
+
runtime: Runtime.NODEJS_22_X,
|
|
160
160
|
architecture: Architecture.ARM_64,
|
|
161
161
|
environment: {
|
|
162
162
|
BUCKET_NAME: bucket.bucketName,
|
|
@@ -230,7 +230,7 @@ export class NextjsSite extends SsrSite {
|
|
|
230
230
|
description: "Next.js revalidator",
|
|
231
231
|
handler: "index.handler",
|
|
232
232
|
code: Code.fromAsset(path.join(this.props.path, ".open-next", "revalidation-function")),
|
|
233
|
-
runtime: Runtime.
|
|
233
|
+
runtime: Runtime.NODEJS_22_X,
|
|
234
234
|
timeout: CdkDuration.seconds(30),
|
|
235
235
|
...cdk?.revalidation,
|
|
236
236
|
});
|
|
@@ -274,7 +274,7 @@ export class NextjsSite extends SsrSite {
|
|
|
274
274
|
description: "Next.js revalidation data insert",
|
|
275
275
|
handler: "index.handler",
|
|
276
276
|
code: Code.fromAsset(dynamodbProviderPath),
|
|
277
|
-
runtime: Runtime.
|
|
277
|
+
runtime: Runtime.NODEJS_22_X,
|
|
278
278
|
timeout: CdkDuration.minutes(15),
|
|
279
279
|
memorySize: Math.min(10240, Math.max(128, Math.ceil(prerenderedRouteCount / 4000) * 128)),
|
|
280
280
|
initialPolicy: [
|
package/constructs/RDS.js
CHANGED
|
@@ -343,7 +343,7 @@ export class RDS extends Construct {
|
|
|
343
343
|
// Create custom resource handler
|
|
344
344
|
const handler = new Function(this, "MigrationHandler", {
|
|
345
345
|
code: Code.fromAsset(path.join(__dirname, "../support/script-function")),
|
|
346
|
-
runtime: Runtime.
|
|
346
|
+
runtime: Runtime.NODEJS_22_X,
|
|
347
347
|
handler: "index.handler",
|
|
348
348
|
timeout: CDKDuration.minutes(15),
|
|
349
349
|
memorySize: 1024,
|
package/constructs/Script.js
CHANGED
|
@@ -121,7 +121,7 @@ export class Script extends Construct {
|
|
|
121
121
|
createCustomResourceFunction() {
|
|
122
122
|
const handler = new CdkFunction(this, "ScriptHandler", {
|
|
123
123
|
code: Code.fromAsset(path.join(__dirname, "../support/script-function")),
|
|
124
|
-
runtime: Runtime.
|
|
124
|
+
runtime: Runtime.NODEJS_22_X,
|
|
125
125
|
handler: "index.handler",
|
|
126
126
|
timeout: Duration.minutes(15),
|
|
127
127
|
memorySize: 1024,
|
|
@@ -111,9 +111,7 @@ export class SsrFunction extends Construct {
|
|
|
111
111
|
? Runtime.NODEJS_22_X
|
|
112
112
|
: runtime === "nodejs20.x"
|
|
113
113
|
? Runtime.NODEJS_20_X
|
|
114
|
-
:
|
|
115
|
-
? Runtime.NODEJS_16_X
|
|
116
|
-
: Runtime.NODEJS_18_X,
|
|
114
|
+
: Runtime.NODEJS_18_X,
|
|
117
115
|
architecture,
|
|
118
116
|
memorySize: typeof memorySize === "string"
|
|
119
117
|
? toCdkSize(memorySize).toMebibytes()
|
package/constructs/SsrSite.js
CHANGED
|
@@ -229,7 +229,7 @@ export class SsrSite extends Construct {
|
|
|
229
229
|
const warmer = new CdkFunction(self, "WarmerFunction", {
|
|
230
230
|
description: "SSR warmer",
|
|
231
231
|
code: Code.fromAsset(plan.warmer?.function ?? path.join(__dirname, "../support/ssr-warmer")),
|
|
232
|
-
runtime: Runtime.
|
|
232
|
+
runtime: Runtime.NODEJS_22_X,
|
|
233
233
|
handler: "index.handler",
|
|
234
234
|
timeout: CdkDuration.minutes(15),
|
|
235
235
|
memorySize: 128,
|
package/constructs/Stack.js
CHANGED
|
@@ -196,7 +196,7 @@ export class Stack extends CDKStack {
|
|
|
196
196
|
assetHash: this.stackName + fs.readFileSync(dir + "/index.mjs").toString(),
|
|
197
197
|
}),
|
|
198
198
|
handler: "index.handler",
|
|
199
|
-
runtime: lambda.Runtime.
|
|
199
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
200
200
|
timeout: CDKDuration.seconds(900),
|
|
201
201
|
memorySize: 1024,
|
|
202
202
|
});
|
|
@@ -47,7 +47,7 @@ export class DnsValidatedCertificate extends CertificateBase {
|
|
|
47
47
|
const requestorFunction = new lambda.Function(this, "CertificateRequestorFunction", {
|
|
48
48
|
code: lambda.Code.fromAsset(path.join(__dirname, "../../support/certificate-requestor")),
|
|
49
49
|
handler: "index.certificateRequestHandler",
|
|
50
|
-
runtime: lambda.Runtime.
|
|
50
|
+
runtime: lambda.Runtime.NODEJS_22_X,
|
|
51
51
|
timeout: Duration.minutes(15),
|
|
52
52
|
role: props.customResourceRole,
|
|
53
53
|
});
|
|
@@ -1045,9 +1045,6 @@ export class NextjsSite extends Construct {
|
|
|
1045
1045
|
if (runtime === "nodejs20.x") {
|
|
1046
1046
|
return lambda.Runtime.NODEJS_20_X;
|
|
1047
1047
|
}
|
|
1048
|
-
if (runtime === "nodejs16.x") {
|
|
1049
|
-
return lambda.Runtime.NODEJS_16_X;
|
|
1050
|
-
}
|
|
1051
1048
|
return lambda.Runtime.NODEJS_18_X;
|
|
1052
1049
|
}
|
|
1053
1050
|
}
|
|
@@ -18,7 +18,7 @@ export function getOrCreateBucket(scope) {
|
|
|
18
18
|
const provider = new lambda.Function(stack, providerId, {
|
|
19
19
|
code: lambda.Code.fromAsset(path.join(__dirname, "../../support/edge-function")),
|
|
20
20
|
handler: "s3-bucket.handler",
|
|
21
|
-
runtime: lambda.Runtime.
|
|
21
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
22
22
|
timeout: Duration.minutes(15),
|
|
23
23
|
memorySize: 1024,
|
|
24
24
|
initialPolicy: [
|
|
@@ -50,7 +50,7 @@ export function createFunction(scope, name, role, bucketName, functionParams) {
|
|
|
50
50
|
provider = new lambda.Function(stack, providerId, {
|
|
51
51
|
code: lambda.Code.fromAsset(path.join(__dirname, "../../support/edge-function")),
|
|
52
52
|
handler: "edge-lambda.handler",
|
|
53
|
-
runtime: lambda.Runtime.
|
|
53
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
54
54
|
timeout: Duration.minutes(15),
|
|
55
55
|
memorySize: 1024,
|
|
56
56
|
initialPolicy: [
|
|
@@ -88,7 +88,7 @@ export function createVersion(scope, name, functionArn) {
|
|
|
88
88
|
provider = new lambda.Function(stack, providerId, {
|
|
89
89
|
code: lambda.Code.fromAsset(path.join(__dirname, "../../support/edge-function")),
|
|
90
90
|
handler: "edge-lambda-version.handler",
|
|
91
|
-
runtime: lambda.Runtime.
|
|
91
|
+
runtime: lambda.Runtime.NODEJS_20_X,
|
|
92
92
|
timeout: Duration.minutes(15),
|
|
93
93
|
memorySize: 1024,
|
|
94
94
|
initialPolicy: [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"sideEffects": false,
|
|
3
3
|
"name": "sst",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.47.0",
|
|
5
5
|
"bin": {
|
|
6
6
|
"sst": "cli/sst.js"
|
|
7
7
|
},
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@aws-sdk/types": "^3.451.0",
|
|
102
102
|
"@graphql-tools/merge": "^8.3.16",
|
|
103
103
|
"@sls-next/lambda-at-edge": "^3.7.0",
|
|
104
|
-
"@smithy/types": "
|
|
104
|
+
"@smithy/types": "4.1.0",
|
|
105
105
|
"@tsconfig/node16": "^1.0.3",
|
|
106
106
|
"@tsconfig/node18": "^18.2.2",
|
|
107
107
|
"@types/adm-zip": "^0.5.0",
|