You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support for --parameter-values in sam local 0.3.0 #572
I read issues #400 and #456 and it looks like --parameter-values or --parameter-overrides are no longer supported for sam local invoke command. The ability to pass on parameters to a SAM Template when running locally is critical to test the behavior of the lambda function when deployed remotely.
Will --parameter-values or --parameter-overrides be supported for 'sam local invoke' command in future releases?
Reacted by luyun-aa, Al Johri, Vijay Gaikwad, Art Nitipon Suratwisit, Chris Ramón, Ian Lintner and Chris Owens
SAM CLI --parameter-overrides doesn't use the same format as AWS CLI
$ aws cloudformation deploy help
--parameter-overrides (list) A list of parameter structures that spec-
ify input parameters for your stack template. If you're updating a
stack and you don't specify a parameter, the command uses the stack's
existing value. For new stacks, you must specify parameters that don't
have a default value. Syntax: ParameterKey1=ParameterValue1 Parame-
terKey2=ParameterValue2 ...
Syntax:
"string" "string" ...
$ sam local start-api --help
--parameter-overrides Optional. A string that contains
CloudFormation parameter overrides encoded
as key=value pairs. Use the same format as
the AWS CLI, e.g. 'ParameterKey=KeyPairName,
ParameterValue=MyKey ParameterKey=InstanceTy
pe,ParameterValue=t1.micro'
Users gets the following error while using aws cloudformation deploy format:
Error: Invalid value for "--parameter-overrides": ParameterKey1=ParameterValue1 is not in valid format. It must look something like 'ParameterKey=KeyPairName,ParameterValue=MyKey ParameterKey=InstanceType,ParameterValue=t1.micro'
Reacted by stephledev, em-shea, Timo Schinkel, Guilherme Job, Kerber and Chris Owens
Using sam local start-api --parameter-overrides Environment=dev throws:
Error: Invalid value for "--parameter-overrides": Environment=dev is not in valid format. It must look something like 'ParameterKey=KeyPairName,ParameterValue=MyKey ParameterKey=InstanceType,ParameterValue=t1.micro'
Activity
luyun-aa commentedon Aug 17, 2018
+1 for this feature. It's really helpful in local testing.
jfuss commentedon Oct 24, 2018
Closing. Was released with 0.6.1
medinarrior commentedon Nov 7, 2018
SAM CLI --parameter-overrides doesn't use the same format as AWS CLI
$ aws cloudformation deploy help
$ sam local start-api --help
Users gets the following error while using
aws cloudformation deployformat:Error: Invalid value for "--parameter-overrides": ParameterKey1=ParameterValue1 is not in valid format. It must look something like 'ParameterKey=KeyPairName,ParameterValue=MyKey ParameterKey=InstanceType,ParameterValue=t1.micro'guijob commentedon Feb 6, 2019
Using
sam local start-api --parameter-overrides Environment=devthrows:jfuss commentedon Feb 6, 2019
@guijob The way you are specifying them are incorrect.
sam local start-api --parameter-overrides ParameterKey=Environment,ParameterValue=devpmayet commentedon Feb 22, 2019
@jfuss How override multi parameters ?
martijnvankempen commentedon Jul 18, 2019
@pmayet You can override multiple parameters by using quotes.
Example:
--parameter-overrides "ParameterKey=Key1,ParameterValue=value1 ParameterKey=Key2,ParameterValue=value2"