@lambda-kata/cdk 0.1.3-rc.76 → 0.1.3-rc.78

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.
@@ -97,7 +97,24 @@ export interface SnapStartActivatorConfig {
97
97
  * @default 'kata'
98
98
  */
99
99
  aliasName?: string;
100
+ /**
101
+ * @internal Override pre-publish delay in milliseconds (for testing only).
102
+ * @default 3000
103
+ */
104
+ _prePublishDelayMs?: number;
105
+ /**
106
+ * @internal Override retry delay in milliseconds (for testing only).
107
+ * @default 5000
108
+ */
109
+ _retryDelayMs?: number;
100
110
  }
111
+ /**
112
+ * Sleep for specified milliseconds.
113
+ * @internal Exported for testability — tests can jest.spyOn to avoid real delays.
114
+ */
115
+ export declare const _testable: {
116
+ sleep(ms: number): Promise<void>;
117
+ };
101
118
  /**
102
119
  * Activates SnapStart on a Lambda function.
103
120
  *
@@ -105,10 +122,14 @@ export interface SnapStartActivatorConfig {
105
122
  * 1. Ensures function is Active
106
123
  * 2. Enables SnapStart configuration
107
124
  * 3. Waits for configuration update
108
- * 4. Publishes new version
125
+ * 4. Publishes new version (with retry on snapshot failure)
109
126
  * 5. Waits for snapshot creation
110
127
  * 6. Creates/updates alias
111
128
  *
129
+ * Steps 3+4 are wrapped in a retry loop: on State: Failed, a new version
130
+ * is published (up to MAX_PUBLISH_RETRIES attempts) to handle transient
131
+ * initialization failures during snapshot creation.
132
+ *
112
133
  * @param lambdaClient - AWS Lambda client
113
134
  * @param functionName - Name or ARN of the Lambda function
114
135
  * @param config - Optional configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambda-kata/cdk",
3
- "version": "0.1.3-rc.76",
3
+ "version": "0.1.3-rc.78",
4
4
  "description": "AWS CDK integration for Lambda Kata - Node.js Lambdas running via Lambda Kata runtime",
5
5
  "main": "out/dist/index.js",
6
6
  "types": "out/tsc/src/index.d.ts",