You have been requested to use CloudFormation to maintain version control and achieve automation for the applications in your organization.
The environment will consist of several networking components and application services.
What is the best way to design the template?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - A.
Create separate stacks templates.
So create a separate one for networking so that can be managed separately.
Option B is incorrect because custom resources is not the right option for managing multiple components.
Option C is incorrect because You can't have multiple templates in one CloudFormation stack.
Option D is incorrect because maintaining one template can become an issue.
For more information on Cloudformation best practises please refer to the below link.
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/best-practices.htmlWhen using CloudFormation to maintain version control and automation for an environment with networking components and application services, there are different design options to consider.
A. Create separate templates based on functionality, create nested stacks with CloudFormation. This option involves creating separate templates for different functionality, such as one for networking components and another for application services. Each template can then be launched as a nested stack within a parent CloudFormation stack, allowing for easier management of resources and updates. This approach allows for modularity and reuse of templates, as well as reducing the risk of failures impacting the entire stack.
B. Use CloudFormation custom resources to handle dependencies between stacks This option involves using CloudFormation custom resources to manage dependencies between stacks, allowing for more flexibility in the design of the stack. Custom resources can be used to execute arbitrary code during the creation or update of a stack, allowing for custom logic to be implemented.
C. Create multiple templates in one CloudFormation stack. This option involves creating multiple templates within a single CloudFormation stack. This approach can make the stack easier to manage, but also increases the risk of failures impacting the entire stack. It can also make it more difficult to reuse templates across different stacks.
D. Combine all resources into one template for version control and automation. This option involves combining all networking components and application services into a single CloudFormation template. This approach can make it easier to manage the stack, but can also make it more difficult to reuse templates and increase the risk of failures impacting the entire stack.
Overall, option A is the best way to design the template for maintaining version control and achieving automation for the environment. It allows for modularity, reuse of templates, and reduced risk of failures impacting the entire stack. Option B can also be a viable option depending on the specific requirements of the environment, but may require more advanced knowledge of CloudFormation custom resources. Option C and D both have drawbacks that make them less optimal for this use case.