Former2 – A tools for you to generate Infrastructure as code from your existing resources

Former2 is a reverse engineering tools that allow you to generate Infrastructure-as-Code from your existing resources within your AWS account. By using the AWS JavaScript SDK, Former2 will scan across your infrastructure and present you with the list of resources for you to choose which one to generate outputs for.

This is very helpful tools for those who already implemented their infrastructure and wish to convert the way of infrastructure management into code base instead of configure via console. Without the help of Former2, you may need to import your resources back to code either CloudFormation or Terraform manually, which may also lead to human mistake or lead to a lot of testing time to ensure the new infrastructure as code are fully compatible and synchronize with your current resources.


Since Former2 is utilize AWS JavaScript SDK, so what you need to do is just to install the browser extension and configure your AWS IAM key to make it work. The extension exists to bypass a lock of CORS on some services, such as S3 and IAM.

Install Former2 Helper for Google Chrome

Install Former2 Helper for Mozilla Firefox

Install Former2 Helper for Microsoft Edge


Visit to start.

You will need an IAM key pair to authenticate your requests. If you are not planning on importing resources directly, it is recommended that you provide only read access with these credentials and suggest you assign the ReadOnlyAccess policy. If you intend to use the Import feature, you should grant appropriate permissions to create the stack.

Once authenticated you can navigate via the dashboard or sidebar to specific services, select the resources to add to your outputs and finally click the “Generate” button at the top of the screen.

The following outputs are currently supported:

  • CloudFormation
  • Terraform
  • Troposphere
  • CDK (Cfn Primitives) – TypeScript, Python, Java, C#
  • CDK for Terraform – TypeScript
  • Pulumi – TypeScript
  • Diagram – embedded version of

When landing on Former2 home page, you will be redirect to introduction and setup page, just click on the link base on your browser to install the respective extension
Since I’m using Google Chrome, just click the Google Chrome extension link to the store and install it
Next, setup your AWS IAM credentials, it’s best to create a new credentials with only read only permission to minimize any impact to your AWS account
On the parameter page, you may customize your CloudFormation stack by adding any parameters, you may used to reference these parameters at the output of your stack
On the last step, you may configure and customize your setting, after all, you may click on the Scan Again button to scan your resources, it may take sometime base on the number of resources that you
Once the scan complete, you can click on the search link at the left menu, Former2 will show you all the resources that they manage to scan from your AWS account in particular region, you may select the resources that you want to generated into your IAC and click on generated.
Alternatively, you can select your resources base on the categories, such as compute, containers, storage and so on. Once you select the resource, just click on Add Selected to generate it into IAC
You should get your IAC code by now, default it will generate your resources into CloudFormation code, but you can select other IAC as well such as Terraform, Troposphere, CloudFormation CDK, Terraform CDK and other.

Overall, I find out Former2 really helpful as it’s a really great tools for those who try to convert their existing infrastructure into code as a backup or upgrading the way of managing the infrastructure.

But bear in mind that this tools only help you to export your infrastructure only, but not the configuration you done in the system. So for those bootstrapped script that you run when you start up your ec2, you may need to code it back manually. But Former2 already help you solve most of the conversion and exporting job which is really handy for most of the devops engineer.

Leave a Reply, pub-3772983857049267, DIRECT, f08c47fec0942fa0
%d bloggers like this: