(CLI): Hotswap raises Invalid Arn when updating state machine definition
See original GitHub issueWhat is the problem?
CDK deploy with hotswap fails with Invalid ARN prefix
error as follows when updating a state definition :
> cdk deploy --hotswap
.......
MyWorkflow123456 failed: InvalidArn: Invalid Arn: 'Invalid ARN prefix: MyWorkflow123456'
at Request.extractError (####/node_modules/aws-cdk/node_modules/aws-sdk/lib/protocol/json.js:52:27)
at Request.callListeners (####/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (####/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (####/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:688:14)
at Request.transition (####/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (####/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:14:12)
at ####/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (####/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (####/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:690:12)
at Request.callListeners (####/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:116:18) {
code: 'InvalidArn',
time: 2021-11-25T16:08:44.977Z,
requestId: '###################',
statusCode: 400,
retryable: false,
retryDelay: 40.19606554280166
}
Invalid Arn: 'Invalid ARN prefix: MyWorkflow123456'
This may be due to this: https://github.com/aws/aws-cdk/blob/557f9c33541e74f94ca6a3a3b70106a8160d766c/packages/aws-cdk/lib/api/hotswap/stepfunctions-state-machines.ts#L59
Reproduction Steps
Deploying with --hotswap
a state machine in my AWS / CDK environment. A normal deploy (without hotswap) works fine.
What did you expect to happen?
AWS Step Functions State machine updated successfully with hotswap.
What actually happened?
Command line failure to update AWS Step Functions state machine.
CDK CLI Version
1.134.0 (build dd5e12d)
Framework Version
No response
Node.js Version
16.13.0
OS
macOS 12.0.1 (Monterey)
Language
Typescript
Language Version
4.4.3
Other information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
UpdateStateMachine - AWS Step Functions
Updates an existing state machine by modifying its definition , roleArn , or loggingConfiguration . Running executions will continue to use the previous ......
Read more >AWS State Machine error when testing locally ...
Evidently the state machine code does not accept an actual DB Arn. It should be like this. arn:aws:states:::dynamodb:getItem.
Read more >@aws-cdk/aws-stepfunctions | Yarn - Package Manager
A States.Runtime error is not retriable, and will always cause the execution to fail. A retry or catch on States.ALL will NOT catch...
Read more >AWS Step Functions | Noise | Page 2
The next step in the state machine, updateDynamoDB, invokes a third Lambda function that updates the DynamoDB table with the domain that was...
Read more >Gateway and SBC CLI Reference Guide Version 7.4
Updated sections: Accessing the CLI (password complexity); Basic User ... from-ip); sbc-sdr-format (call-type); is-proxy-hot-swap (values).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great, thanks ! The hotswap feature for AWS Step Functions is really key to us so we can boost our deployment pipeline. I’ve seen the CDK 2.0 announcement and hope that the fix can still reach the 1.x branch.
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.