Debugging commands

I’m trying to setup a command in my config.yml:

version: 2.1

commands:
  deploy_to_elasticbeanstalk:
    description: "Copy the bits to the appropriate EB environment"
    parameters:
      deployenv:
        description: "which elastic beanstalk environment to deploy to"
        type: string
        default: "master"
    steps:
      - run:
        name: Foo
        command: |
          ls

and I get an error:

#!/bin/sh -eo pipefail
# ERROR IN CONFIG FILE:
# [#/commands/deploy_to_elasticbeanstalk] 0 subschemas matched instead of one
# 1. [#/commands/deploy_to_elasticbeanstalk/steps/0] 0 subschemas matched instead of one
# |   1. [#/commands/deploy_to_elasticbeanstalk/steps/0] expected type: String, found: Mapping
# |   |   Shorthand commands, like `checkout`
# |   |   SCHEMA:
# |   |     type: string
# |   |   INPUT:
# |   |     run: null
# |   |     name: Foo
# |   |     command: |
# |   |       ls
# |   2. [#/commands/deploy_to_elasticbeanstalk/steps/0] maximum size: [1], found: [2]
# |   |   long form commands like `run:`
# |   |   SCHEMA:
# |   |     maxProperties: 1
# |   |   INPUT:
# |   |     run: null
# |   |     name: Foo
# |   |     command: |
# |   |       ls
# 2. [#/commands/deploy_to_elasticbeanstalk] expected type: String, found: Mapping
# |   Command may be a string reference to another command
# 
# -------

I know that my command’s step is not being parsed correctly, as I can see from a YAML parser that my YAML corresponds to:

{
  "commands": {
    "deploy_to_elasticbeanstalk": {
      "steps": [
        {
          "run": null, 
          "command": "ls", 
          "name": "Foo"
        }
      ], 
      "description": "Copy the bits to the appropriate EB environment", 
      "parameters": {
        "deployenv": {
          "default": "master", 
          "type": "string", 
          "description": "which elastic beanstalk environment to deploy to"
        }
      }
    }
  }, 
  "version": 2.1
}

I have no idea how to fix this, any help would be greatly appreciated! I have tried various random changes to the indentation, with no luck. As a meta-aside, it’s extremely frustrating when certain seemingly-innocuous but presumably-fatal changes to one’s config.yml causes zero output on CircleCI, so there is nothing to debug.