Stage name issue after deployment

In the serverless.yml file, I was using interpolation to generate stage value. And I got the following errors after running sls deploy.

# serverless.yml
provider:
  name: aws
  runtime: nodejs6.10
  memorySize: 512
  timeout: 30
  stage: ${self:custom.CONFIG.STAGE, 'dev'} 
  region: ${self:custom.CONFIG.REGION}
custom:
  CONFIG: ${file(config.yml):env}
# config.yml
env:
  STAGE: dev
  REGION: ap-southeast-2
# Error log 
Serverless: 'Too many requests' received, sleeping 5 seconds
Serverless: 'Too many requests' received, sleeping 5 seconds
Serverless: 'Too many requests' received, sleeping 5 seconds
 
  Serverless Error ---------------------------------------
 
  Stage name only allows a-zA-Z0-9_

This error can be fixed by using static values like ‘dev’ or ‘production’.

Can you include your config.yml?

Just updated. Actually, it might not be caused by the file config.yml, coz even I change it to stage: ${opt.stage, 'dev'}, the error still can be reproduced. But using stage: dev works well.

Did you mean ${opt.stage, 'dev'} because it should be ${opt:stage, 'dev'}

Yes, that was a typo. It should be ${opt:stage, 'dev'}. Even the using the correct syntax, I still keep getting same error.