def METHOD_NAME(backend_port):
    install_dir_stepfunctions = stepfunctions_local_package.get_installed_dir()
    cmd = (
        "cd %s; PORT=%s java "
        "-javaagent:aspectjweaver-1.9.7.jar "
        "-Dorg.aspectj.weaver.loadtime.configuration=META-INF/aop.xml "
        "-Dcom.amazonaws.sdk.disableCertChecking -Xmx%s "
        "-jar StepFunctionsLocal.jar --aws-account %s"
    ) % (
        install_dir_stepfunctions,
        backend_port,
        MAX_HEAP_SIZE,
        get_aws_account_id(),
    )
    if config.STEPFUNCTIONS_LAMBDA_ENDPOINT.lower() != "default":
        lambda_endpoint = config.STEPFUNCTIONS_LAMBDA_ENDPOINT or aws_stack.get_local_service_url(
            "lambda"
        )
        cmd += f" --lambda-endpoint {lambda_endpoint}"
    # add service endpoint flags
    services = [
        "athena",
        "batch",
        "dynamodb",
        "ecs",
        "eks",
        "events",
        "glue",
        "sagemaker",
        "sns",
        "sqs",
        "stepfunctions",
    ]
    for service in services:
        flag = f"--{service}-endpoint"
        if service == "stepfunctions":
            flag = "--step-functions-endpoint"
        elif service == "events":
            flag = "--eventbridge-endpoint"
        elif service in ["athena", "eks"]:
            flag = f"--step-functions-{service}"
        endpoint = aws_stack.get_local_service_url(service)
        cmd += f" {flag} {endpoint}"
    return cmd