Skip to content

Validation error for Step Function using Eventbridge Connection with definition substitution #10060

@btyrrell-mn

Description

@btyrrell-mn

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

  • Select this option if this issue appears to be a regression.

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

Metadata

Metadata

Assignees

Labels

feature-requestA feature should be added or improved.p3This is a minor priority issueservice-apiThis issue is due to a problem in a service API, not the SDK implementation.stepfunctions

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions