I'd like to create a SAM template.yml containing lambda and several sqs's. I'd like to deploy it with parameters but not populate all the sqs's only some depending on the environment I need to deploy it on. How do I create a template with partial parameters populated?
Asked
Active
Viewed 7,595 times
2 Answers
5
I found how to do it in CloudFormation: https://aws.amazon.com/blogs/infrastructure-and-automation/conditionally-launch-aws-cloudformation-resources-based-on-user-input/
And here's how to do it in SAM template: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-template-anatomy.html

aQ123
- 560
- 1
- 8
- 19
1
For SAM templates, see these docs also for setting parameter_overrides
via a samconfig.toml
file:
You can specify the location of the config file with the --config-file /path/to/samconfig.toml
argument.
Example samconfig.toml
file with parameters configured:
version=0.1
[default.global.parameters]
parameter_overrides=[
"TemplateInput1=Value1",
"TemplateInput2=Value2"
]

stwr667
- 1,566
- 1
- 16
- 31