CloudFormation (CFN) is a superb templating framework or DSL that you should utilize to outline infrastructure in both YAML or JSON.
Over time I’ve watched it develop from one thing that was comparatively tough to implement to now being broadly accepted and simpler, however nonetheless with some caveats. Once I began doing enterprise cloud migrations (~2012) to AWS I used to be utilizing instruments like Ansible to unravel the issue of automating IAM, EC2s, RDS and VPC. Along with this we did not have a number of of the instruments we’ve got now accessible for migrating to AWS.
I began utilizing CFN templates to create IAM insurance policies, EC2 templates and Roles and likewise VPCs. A number of the challenges again then was across the JSON formatting and injecting parameter’s values into deployment. Because of this I used instruments like Ansible and the AWS CLI to wrap round CFN templates. This is able to give me management round what AMIs I may use for an EC2 for instance or what AccountID I may use in a parameter for a Cross Account IAM Function.
One other subject I discovered was that when launching a CFN template you’re all the time going to have the difficulty of conditionals based mostly on Parameter values. For instance for an EC2 template if you happen to launch it in a public subnet you may need to have a Public IP, however if you happen to launch it in a personal subnet you’ll solely desire a personal IP.
** Person knowledge
Person knowledge in EC2 launches may be one other drawback that’s not solved by templates alone. For instance you possibly can present consumer knowledge to run a command or run a script on preliminary launch.
Total the most important problem for people who find themselves new to utilizing CloudFormation is studying the syntax and forms of assets you want and the parameters accessible. The documentation offers this, however it may be difficult studying via strains and features of documentation.
One of many concepts I had was with the ability to assist individuals find out about AWS CloudFormation and supporting them in with the ability to create their very own templates.
You’ll be able to strive https://app.teemops.com/ to get an concept of what I am speaking about – it lets you use a primary UI to generate a template and launch it in your individual AWS account, saving you hours of frustration studying. The supply code is all accessible on https://github.com/teemops/tui if you wish to run regionally and play with.
For the time being I solely assist EC2 and Autoscaling teams, however the concept is to assist as many AWS assets as attainable. Give it a attempt to I stay up for suggestions.