When working with CloudFormation, it is always good to remember the following best practices:
- Separate stacks into application tiers or by ownership so that a team that manages a certain unit will have complete control over it.
- Share stacks that create reusable resources, such as networks, security rules, and typologies. When using shared stacks, use the cross-stack references to reference IDs from other stacks.
- Always tightly control access to CloudFormation using IAM. CloudFormation is as powerful as all the other management tools, so make sure to only give permissions that the users require (least privilege).
- Do not embed any IDs unless you are explicitly referencing an existing resource.
- Use Mappings to map resources IDs to their regions.
- Do not embed any credentials in the template.
- Use the Parameters section to constrain users to certain object types;...