bug: Credentials Field in Task State causing error during Deployment #10755
Labels
aws:stepfunctions
AWS Step Functions
status: backlog
Triaged but not yet being worked on
type: feature
New feature, or improvement to an existing feature
Is there an existing issue for this?
Current Behavior
According the the current ASL Spec:
A Task State MAY include a "Credentials" field, whose value MUST be a JSON object whose value is defined by the interpreter. The States language does not constrain the value of the "Credentials" field. The interpreter will use the specified credentials to execute the work identified by the state's "Resource" field.
We are currently leveraging this field to pass in a
Role Arn
when oneAWS::Serverless::StateMachine
executes another. However, there's an error when trying to deploy this config using localstack:An error occurred (InvalidDefinition) when calling the CreateStateMachine operation: ASLParserException ['line 14:8, at "Credentials", mismatched input \'"Credentials"\' expecting{\'"Comment"\', \'"Type"\', \'"Choices"\', \'"Default"\', \'"Branches"\',\'"SecondsPath"\', \'"Seconds"\', \'"TimestampPath"\', \'"Timestamp"\', \'"TimeoutSeconds"\', \'"TimeoutSecondsPath"\',\'"HeartbeatSeconds"\',\'"HeartbeatSecondsPath"\', \'"ItemProcessor"\', \'"Iterator"\',\'"ItemSelector"\', \'"MaxConcurrency"\',\'"Resource"\', \'"InputPath"\', \'"OutputPath"\', \'"ItemsPath"\',\'"ResultPath"\', \'"Result"\',\'"Parameters"\', \'"ResultSelector"\',\'"ItemReader"\', \'"Next"\', \'"End"\',\'"Cause"\', \'"Error"\', \'"Retry"\', \'"Catch"\'}', "line 17:15, at true, mismatched input 'true' expecting '{'"]
I'm not sure if this is a bug or it's a feature that's missing support, but deploying an ASL in this manner works perfectly fine. It's only when running locally with localstack that it presents an issue. Here are the example files I used to recreate the issue:
Expected Behavior
Localstack deploys the application normally.
How are you starting LocalStack?
With the
localstack
scriptSteps To Reproduce
sam-template:
first_state_machine_definition.asl.json:
second_state_machine_definition.asl.json:
Command used to start the localstack instance:
samlocal deploy --template-file sam-template-for-github.yml --stack-name github-example --region us-east-1 --resolve-s3
Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: