How to pass parameters to sam template with override-parameters with optional parameters
Asked Answered
G

2

5

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?

Glyndaglynias answered 15/4, 2020 at 23:7 Comment(0)
P
2

For SAM templates, see these docs also for setting parameter_overrides via a samconfig.toml file:

https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-config.html

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"
]
Permute answered 16/12, 2022 at 4:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.