How to run sam local start-api

When I run sam local start-api in the jbo, I always get Build was canceled. My configuration is like this. Main purpose is invoke sam local start-api and get response with curl.

I have no idea to fix it.

version: 2

jobs:
  deploy-dev:
    machine: true
    steps:
      - checkout
      - run:
          name: load latest
          command: |
            cd /opt/circleci/.pyenv
            git pull
      - run:
          name: install python 3.6.3
          command: |
            pyenv install 3.6.3
            pyenv global 3.6.3
      - run:
          name: sam build
          command: |
            pip install pipenv
            python -m venv venv
            source venv/bin/activate

            pip install aws-sam-cli

            sam build --use-container

            sam local start-api
          background: true
      - run:
          name: curl
          command: |
            curl -X GET http://127.0.0.1:3000/hello

workflows:
  version: 2
  aws-sam-build:
    jobs:
      - deploy-dev