I have two questions about AWS SAM and deployments.
I’m reading through the docs and checking through examples like this and I’m still not quite sure how to deploy to a staging
and production
environment separately with my SAM template. Is it as simple as deploying a new stack with a new name like sam deploy —stack-name my-app-staging
and sam deploy —stack-name my-app-production
?
In the following example, I have one question. If my SAM template contains a Parameters
with the name MyEnvironment
that has three possible values, how does the deploy know which value of the three to use when deploying the stack? Like how would I say to use the value staging
or production
? Is that something that will automatically be asked of me when I deploy or is it something I have to provide on the CLI?
—guided
would cause the user to be prompted to provide values for each parameter declared in theParameters
section. See here underParameters
. – Virgenvirgie