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?
How to pass parameters to sam template with override-parameters with optional parameters
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
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"
]
© 2022 - 2024 — McMap. All rights reserved.