Former2 - AWS Infrastructure to CloudFormation
Updated: Sep 30, 2022
with a special guest: Ian McKay, Former2 Developer
While working on AWS services, I always wondered why there is no tool that I can use to
convert existing services/configurations to CloudFormation templates. It would be so practical to
have this as an option on any given AWS service console, so I asked AWS Awesome support
and our TAM several times, but unfortunately I always received the reply stating that this is a
great idea and that was the end of it.
When I finally found such a tool, my joy knew no bounds. Behold “Former2”.
I was so impressed by Ian’s solution that I contacted him by email and eventually grabbed him
for a chat about his project:
Tell me a little bit about yourself:
I am working in Sydney as the Cloud Lead at Kablamo, and also as an AWS Hero. I enjoy
speaking at meetups, co-hosting podcasts, and writing my thoughts about AWS on my blog at
What can you tell me about the project?
Former2 allows you to generate Infrastructure as Code outputs from your existing resources
within your AWS account (that's 124 services, mind you (-; ).
By making the relevant calls using the AWS JavaScript SDK, Former2 will scan across your
infrastructure and generate an output to your liking: CloudFormation, Terraform, CDK Cfn
Primitives/Terraform, and other languages such as Python, Java, C#, & Pulumi - TypeScript, and
finally, even as a draw.io diagram.
I worked previously on a couple of other projects, but really took this project to heart once I saw
its usability. Former2 is actually a fork of an old project used by AWS back in the day, about 10
years ago, so I took it, and continued with it as an open source project.
It can be used via a web interface as well as a command line tool, or you can even host your
own http server.
Former2 does not create any resources within your AWS account and will keep your AWS
credentials locally (in memory) without sending it to the cloud or somewhere else.
You can exclude services, sort outputted data or filter by searching for a specific application.
Former2 takes advantage of the AWS SDK for JavaScript in the browser. It makes Get/List calls
to determine the resources within your AWS account and maps those SDK responses to the
various template formats. Former2 derives its name from the previous CloudFormer tool.
Former2 has evolved to fully support all AWS Services. Both inexperienced and experienced
AWS developers can use Former2 to quickly construct Infrastructure as Code templates for their
companies or customers. You can also add an option to add a deletion policy to your CF
(delete/retain)
What does it cost?
Since it is an open source tool, it will not incur any charges beside the API calls to AWS.
Why open source?
Besides being an awesome concept, as an open source software, anyone can contribute to
Former2, meaning enhancements or bug fixes can be shared by the community. Former2 has
more than 30 pull requests and more than 100 issues raised, which has significantly contributed
to shaping the project. Many of these contributions are raising or fixing bugs that I otherwise
wouldn’t find due to the sheer scale of the AWS products and services. I thank everyone who
has contributed directly or indirectly to the project.
Building trust is also important. Handling AWS credentials is a high-risk activity, and Former2 is
designed to never send these credentials to an external server that isn’t an AWS API endpoint.
Being fully transparent about the code you are running is essential to show that you understand
the sensitivity of the data.
Well, I thank you Ian, for your time, your responsiveness on GitHub and for creating this
awesome solution!
--
Before we start, a couple of words about CloudFormation:
AWS CloudFormation is