Why does `serverless` always try to resolve read default value?

Viewed 69

I am using serverless framework for deploying to AWS. Below is the version:

$ sls --version
Framework Core: 2.64.1 (standalone)
Plugin: 5.5.0
SDK: 4.3.0
Components: 3.17.1

The problem I have is how to let sls skip default value for a variable. Below is my configuration. It has a variable dbStreamArn which will be assigned if there is a command line parameter dbStreamArn, if not it tries to read it from a cloudformation output.

However, when I run sls deploy --dbStreamArn xxxx, I got an error Trying to request a non exported variable from CloudFormation.. It seems that sls tries to get the default value even there is a command line parameter. Is there a way to let sls skip parsing the default value?

custom:
  dbStreamArn: ${opt:dbStreamArn, "${cf:dbs-stack.DynamoDBTableEventsSignalStreamArn}"

0 Answers
Related