Search code examples
yamlsam

How to pass parameters to sam template with override-parameters with optional parameters


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?


Solution

  • 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