Can't create step function through AWS CLI: Argument list too long


Hello, Inside a DevOps process, I was creating step functions through the AWS CLI using this command:

aws stepfunctions update-state-machine --definition "$(cat definition.asl.json)" --state-machine-arn ***

But it seems that I have a very big step function now which I'm unable to upload, I'm just seeing this error: /usr/local/bin/aws: Argument list too long As the AWS CLI doesn't admit to upload the step function using file, the workflow is now not working. How can I correct this?

1 Answer
Accepted Answer

Try aws stepfunctions update-state-machine --definition file://definition.asl.json --state-machine-arn ...

profile pictureAWS
answered 9 months ago
profile pictureAWS
reviewed 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions