sam deploy should accept parameter file just like aws cloudformation *-stack
See original GitHub issueDescription:
I would like to store configuration is version control and make deployment steps immutable. Instead of changing parameter overrides on the command line I would like to provide template parameters from a file.
There is an idiom for this in aws cloudformation create-stack --parameters file://
.
Steps to reproduce the issue:
sam deploy --parameter-overrides file://params.json
Observed result:
Error: Invalid value for '--parameter-overrides': file://params.json is not in valid format. It must look something like 'ParameterKey=KeyPairName,ParameterValue=MyKey ParameterKey=InstanceType,ParameterValue=t1.micro' or 'KeyPairName=MyKey InstanceType=t1.micro'
Expected result:
Deploying with following values
===============================
Stack name : ...
Region : ...
Confirm changeset : ...
Deployment s3 bucket : ...
Capabilities : ...
Parameter overrides : {'MyParamOverride': 'MyParamValue'}
Issue Analytics
- State:
- Created 3 years ago
- Reactions:44
- Comments:16 (1 by maintainers)
Top Results From Across the Web
sam deploy - AWS Serverless Application Model
Objects declared in the Parameters section of the AWS SAM template file appear as additional interactive mode prompts. The AWS SAM CLI prompts...
Read more >How do I specify template parameters when running AWS ...
You can use the --parameter-overrides in sam deploy just like in aws ... sam deploy --template-file packaged.yaml --stack-name ...
Read more >A Practical Guide to Surviving AWS SAM - Medium
Once the stack is deployed, parameter values can be retrieved from the CloudFormation console and, for SSM Parameter Store, both value and name...
Read more >deploy — AWS CLI 2.1.0 Command Reference
--template-file (string) The path where your AWS CloudFormation template is located. --stack-name (string) The name of the AWS CloudFormation stack you're ...
Read more >Deploying Your Stacks - Stackery Documentation
Install and compile Lambda function dependencies · Create Lambda code package zip files · Upload zip files to s3 · Generate a deployable...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We use a similar pattern to @rojomisin but use a standard environment variable file format.
.sam-params
Then in our Makefile, we
cat
that file and pass them in as--parameter-overrides
I’m using jq as an alternative… Having the following structure
// parameters.json
I can do
The good thing is that file can be shared with Cloudformation templates with: