I have a sam/cloudformation template I am using to manage my stack. I use the same sam/cloudformation template across multiple stacks.
For example I have a dev stack and a prod stack. We have git and CI that updates the corresponding stack based on the branch.
My question is, how can I tell what stack/context my lambda function is running in? This would be useful for configuring DB endpoints.
I know I can setup Environment Variables through the console, but I would like to keep this in the template as much as possible. I don't see a good way to incorporate this into the template.