@jaypie/constructs 1.1.32 → 1.1.33
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/dist/cjs/index.cjs +14 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +14 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -422,6 +422,14 @@ class JaypieLambda extends constructs.Construct {
|
|
|
422
422
|
reservedConcurrentExecutions,
|
|
423
423
|
runtime,
|
|
424
424
|
timeout: typeof timeout === "number" ? cdk$1.Duration.seconds(timeout) : timeout,
|
|
425
|
+
// Enable auto-publishing of versions when using provisioned concurrency
|
|
426
|
+
currentVersionOptions: provisionedConcurrentExecutions !== undefined
|
|
427
|
+
? {
|
|
428
|
+
removalPolicy: cdk$1.RemovalPolicy.RETAIN,
|
|
429
|
+
description: "Auto-published version for provisioned concurrency",
|
|
430
|
+
// Don't set provisioned concurrency here - it will be set on the alias
|
|
431
|
+
}
|
|
432
|
+
: undefined,
|
|
425
433
|
});
|
|
426
434
|
// Grant secret read permissions
|
|
427
435
|
Object.values(envSecrets).forEach((secret) => {
|
|
@@ -439,11 +447,16 @@ class JaypieLambda extends constructs.Construct {
|
|
|
439
447
|
}
|
|
440
448
|
// Configure provisioned concurrency if specified
|
|
441
449
|
if (provisionedConcurrentExecutions !== undefined) {
|
|
450
|
+
// Use currentVersion which is auto-published with proper configuration
|
|
451
|
+
const version = this._lambda.currentVersion;
|
|
452
|
+
// Create alias for provisioned concurrency
|
|
442
453
|
this._alias = new lambda__namespace.Alias(this, "ProvisionedAlias", {
|
|
443
454
|
aliasName: "provisioned",
|
|
444
|
-
version
|
|
455
|
+
version,
|
|
445
456
|
provisionedConcurrentExecutions,
|
|
446
457
|
});
|
|
458
|
+
// Add explicit dependencies to ensure proper creation order
|
|
459
|
+
this._alias.node.addDependency(version);
|
|
447
460
|
}
|
|
448
461
|
if (roleTag) {
|
|
449
462
|
cdk$1.Tags.of(this._lambda).add(cdk.CDK.TAG.ROLE, roleTag);
|