Describe the bug
I am getting a SCHEMA_VALIDATION_ERROR when using aws stepfunctions validate-state-machine-definition on a local definition file that is deployed using SAM.
The validator returns that the ConnectionArn is not valid when I am passing it as a definition substitution.
Regression Issue
Expected Behavior
The validator should pass as this is a definition substitution.
Current Behavior
Schema validation on the state machine fails.
Reproduction Steps
CloudFormation snippet:
Workflow:
Type: AWS::Serverless::StateMachine
Properties:
DefinitionUri: state_machines/workflow.asl.yaml
DefinitionSubstitutions:
ApiUrl: !Sub "https://redacted.url.com"
ApiConnectionArn: !GetAtt APIConnection.Arn
Step Function state YAML:
Get Database Details:
Type: Task
Resource: arn:aws:states:::http:invoke
Arguments:
ApiEndpoint: "{% '${ApiUrl}/v1/resource/' & $resource_id %}"
Method: GET
Authentication:
ConnectionArn: ${ApiConnectionArn}
Assign:
response: "{% $states.result.ResponseBody %}"
Next: Next Step
Here is the validation error:
{
"result": "FAIL",
"diagnostics": [
{
"severity": "ERROR",
"code": "SCHEMA_VALIDATION_FAILED",
"message": "The value for the 'ConnectionArn' field is not valid",
"location": "/States/HTTP API Request/Arguments"
}
],
"truncated": false
}
Possible Solution
The validation should not error on definition substitutions.
Additional Information/Context
No response
CLI version used
2.33.16
Environment details (OS name and version, etc.)
macOS 26.2
Describe the bug
I am getting a
SCHEMA_VALIDATION_ERRORwhen usingaws stepfunctions validate-state-machine-definitionon a local definition file that is deployed using SAM.The validator returns that the
ConnectionArnis not valid when I am passing it as a definition substitution.Regression Issue
Expected Behavior
The validator should pass as this is a definition substitution.
Current Behavior
Schema validation on the state machine fails.
Reproduction Steps
CloudFormation snippet:
Step Function state YAML:
Here is the validation error:
{ "result": "FAIL", "diagnostics": [ { "severity": "ERROR", "code": "SCHEMA_VALIDATION_FAILED", "message": "The value for the 'ConnectionArn' field is not valid", "location": "/States/HTTP API Request/Arguments" } ], "truncated": false }Possible Solution
The validation should not error on definition substitutions.
Additional Information/Context
No response
CLI version used
2.33.16
Environment details (OS name and version, etc.)
macOS 26.2