Former2 is a website that allows you to generate IaC (Infrastructure as Code) templates (such as CloudFormation, CDK, Terraform, etc) from existing AWS resources and is mentioned on AWS Open Source Blog (Accelerate infrastructure as code development with open source Former2 and How DNAnexus used the open source Former2 project to create infrastructure as code templates for their disaster recovery pipeline).
Some users have challenges creating access keys while others have security concerns about entering AWS security credentials on an external website, and would prefer a private web instance. However, Former2 requires browser helper extension that only works with websites that has domain names 127.0.0.1, localhost, former2.com and www.former2.com.
This CloudFormation template provisions an EC2 instance hosting Former2 website in your AWS account. You can remote in to generate and download IaC templates with temporary security credentials.
EC2 instances must be provisioned in a subnet with IPv4 internet connectivity.
Download the CloudFormation template. Login to your CloudFormation console. Choose Create Stack, Upload a template file, Choose File, select your .yaml file and choose Next. Enter a Stack name and specify parameters values.
EC2
ec2Name
: EC2 instance nameprocessorArchitecture
: Intel/AMD x86_64 or Graviton arm64. Default isGraviton (arm64)
instanceType
: EC2 instance types. Do ensure type matches processor architecture.
Network
vpcID
: VPC with internet connectivity. Select default VPC if unsuresubnetID
: subnet with internet connectivity. Select subnet in default VPC if unsuredisplayPublicIP
: set this toNo
if your EC2 instance will not receive public IP address. EC2 private IP will be displayed in CloudFormation Outputs section instead. Default isYes
assignStaticIP
: associates a static public IPv4 address using Elastic IP address. Default isYes
Remote Access
ingressIPv4
: allowed IPv4 source prefix to your EC2 instance, e.g.1.2.3.4/32
. You can get your source IP from https://checkip.amazonaws.comingressIPv6
: allowed IPv6 source prefix to your EC2 instance. Use::1/128
to block all incoming IPv6 access. Default is::/0
EBS
volumeSize
: Amazon EBS volume sizevolumeType
: EBS General Purpose Volume type
Continue Next with Configure stack options, Review Stack, and click Submit to launch your stack. After your stack has been successfully created, its status changes to CREATE_COMPLETE.
Once provisioned, go to Outputs section and use the Values associated with the following Keys
SSMSessionManager
: provides shell access. From session manager terminal, set your ec2-user password with the commandsudo passwd ec2-user
DCVwebConsole
: DCV web browser client. Login as ec2-user and your configured password. Launch Firefox browser and install Former 2 Helper for Mozilla Firefox
GetTokenCommand
: Copy entire string. In your DCV session, open a terminal, and paste copied value in to retrieve temporary security credentials*. Use these values to enter IAM credentials at http://localhost/#section-setup-credentials
Refer to Accelerate infrastructure as code development with open source Former2 blog post for usage guidance.
CloudFormation template downloads Former2 web codes from Ian Mckay's GitHub repo which are released under MIT license.
Former2 is under active development. To download latest codes, login to EC2 instance and run /home/ec2-user/update-former2
script.
DCV supports file transfer. Usage indicates acceptance of DCV EULA.
Native clients can be downloaded from https://download.nice-dcv.com/
To remove created resources, delete your created CloudFormation stack
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.