title: aws serverless.yml file "A valid option to satisfy the declaration 'opt:stage' could not be found" error
body: <p>Getting below warning when trying to run serverless. </p>
  
  <p>Serverless Warning --------------------------------------------</p>
  
  <p>A valid option to satisfy the declaration 'opt:stage' could not be found.
   Below is my serverless.yml file</p>
  
  <pre><code># Serverless Config
  service: api-service
  
  # Provider
      provider:
        name: aws
        runtime: nodejs8.10
        region: ${opt:region, 'ap-east-1'}
        stage: ${opt:stage, 'dev'}
        # Enviroment Varibles
        environment:
          STAGE: ${self:custom.myStage}
          MONGO_DB_URI: ${file(./serverless.env.yml):${opt:stage}.MONGO_DB_URI}
          LAMBDA_ONLINE: ${file(./serverless.env.yml):${opt:stage}.LAMBDA_ONLINE}
  
  
      # Constants Varibles
      custom:
          # environments Variables used for convert string in upper case format
          environments:
          myStage: ${opt:stage, self:provider.stage}
          stages:
            - dev
            - qa
            - staging
            - production
          region:
            dev: 'ap-east-1'
            stage: 'ap-east-1'
            production: 'ap-east-1'
  
      # Function
      functions:
        testFunc:
          handler: index.handler
          description: ${opt:stage} API's
          events:
            - http:
                method: any
                path: /{proxy+}
                cors:
                  origin: '*'
  
      #package
      package:
        exclude:
          - .env
          - node_modules/aws-sdk/**
          - node_modules/**
  </code></pre>