Skip to content

Commit 37974ed

Browse files
authored
fix(lambda): lambda functions that use triggers error when invoked (#23728)
Reverts #23062. #23062 introduced #23407, which causes lambda functions that use triggers to fail to invoke with either this error ``` submit response to cloudformation { Status: 'FAILED', Reason: `TypeError [ERR_INVALID_ARG_TYPE]: The "msecs" argument must be of type number. Received type string ('120000')\n` + ' at new NodeError (internal/errors.js:322:7)\n' + ' at validateNumber (internal/validators.js:129:11)\n' + ' at getTimerDuration (internal/timers.js:384:3)\n' + ' at ClientRequest.setTimeout (_http_client.js:865:11)\n' + ' at features.constructor.handleRequest (/var/runtime/node_modules/aws-sdk/lib/http/node.js:82:12)\n' + ' at executeSend (/var/runtime/node_modules/aws-sdk/lib/event_listeners.js:370:29)\n' + ' at Request.SEND (/var/runtime/node_modules/aws-sdk/lib/event_listeners.js:384:9)\n' + ' at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:102:18)\n' + ' at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)\n' + ' at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:686:14)', StackId: 'arn:aws:cloudformation:us-east-1:***:stack/TestStack/83f77790-806c-11ed-8956-0a55d38b49ed', RequestId: '86a74312-347d-40c4-873a-09eed5b8eddd', PhysicalResourceId: 'AWSCDK::CustomResourceProviderFramework::CREATE_FAILED', LogicalResourceId: 'Trigger', NoEcho: undefined, Data: undefined } ``` or ``` Error: Trigger handler failed with status code 202 at handler (/var/task/index.js:53:15) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Runtime.handler (/var/task/__entrypoint__.js:32:24) (RequestId: ab252a7a-e06b-4fcf-b2b4-f59b2dd88734) ``` Reverting for now, since people are unable to upgrade. To unblock this revert, I'm disabling the integration test `dependencies-pnpm`, because when running it locally (and in this PR build) the logical ID of the version changes every run. This has been reproduced by others locally, so it's being disabled until we can resolve that issue. Fixes #23407
1 parent 4f8a2a5 commit 37974ed

File tree

254 files changed

+202
-44504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+202
-44504
lines changed

allowed-breaking-changes.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -153,4 +153,9 @@ removed:aws-cdk-lib.aws_ec2.InstanceClass.COMPUTE6_GRAVITON2_HIGH_NETWORK_BANDWI
153153

154154
# added new required property StackOutputsMap
155155
strengthened:@aws-cdk/pipelines.ProduceActionOptions
156-
strengthened:aws-cdk-lib.pipelines.ProduceActionOptions
156+
strengthened:aws-cdk-lib.pipelines.ProduceActionOptions
157+
158+
# reverted a change that broke deployments for anyone using Triggers
159+
removed:aws-cdk-lib.triggers.InvocationType
160+
removed:aws-cdk-lib.triggers.TriggerProps.invocationType
161+
removed:aws-cdk-lib.triggers.TriggerProps.timeout

packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies-pnpm.ts renamed to packages/@aws-cdk/aws-lambda-nodejs/test/deactivated-integ-tests/dependencies-pnpm.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as path from 'path';
1+
/*import * as path from 'path';
22
import { Runtime } from '@aws-cdk/aws-lambda';
33
import * as cdk from '@aws-cdk/core';
44
import * as integ from '@aws-cdk/integ-tests';
@@ -33,3 +33,4 @@ new integ.IntegTest(app, 'PnpmTest', {
3333
});
3434
3535
app.synth();
36+
*/

packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies-pnpm.js.snapshot/TestStack.assets.json

-45
This file was deleted.

packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies-pnpm.js.snapshot/TestStack.template.json

-200
This file was deleted.

packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies-pnpm.js.snapshot/asset.a343904202d7c998eb5411d4fae053e829aa44a82bc9a60c3dc0d7c63dd71a19/.pnpm-store/v3/files/00/9530fc7b936783b8c08f83efc065b4b49b6eba10ec493a5725527d98b889a19ef0e98ae732d3812967d9bd31b3d1f062577b260945d9363c34c5c0ffa4a61d

-34
This file was deleted.

0 commit comments

Comments
 (0)