- Effective DevOps with AWS
- Yogesh Raheja Giuseppe Borgese Nathaniel Felsen
- 507字
- 2021-07-23 16:27:32
CloudFormer
CloudFormer is a tool that lets you create CloudFormation templates by looking at pre-existing resources. If you have a set of resources that you have already created on an ad hoc basis, as we have done so far in the book, then you can use CloudFormer to group them under a new CloudFormation template. You can then later customize the template that CloudFormer generates using a text editor or even CloudFormation designer, making it fit your needs. Unlike most AWS tools and services, CloudFormer isn't completely managed by AWS; it's a self-hosted tool that you can instantiate on demand using CloudFormation. To do so, follow the given steps:
- Open https://console.aws.amazon.com/cloudformation in your browser.
- Now, scroll down the AWS console screen, select Create a Template from your Existing Resources option, and click on the Launch CloudFormer button.
- In the Select a sample template drop-down menu, choose the CloudFormer option and click on the Next button, as shown in the following screenshot:
- On that screen, at the top, you can provide a stack name (feel free to keep the default name, AWSCloudFormer) and in the bottom part, you are asked to provide three additional parameters, a Username, a Password and VPC Selection. This username and password will be used later to log into CloudFormer. Pick a username and a password, select the Default VPC, and click on the Next button.
- On the next screen, you can provide extra tags and more advanced options, but we will simply continue by clicking on the Next button.
- This brings us to the review page, where we will check the checkbox to acknowledge that this will cause AWS CloudFormation to create IAM resources. Click on the Create button.
- This will bring us back to the main screen of the CloudFormation console, where we can see our AWS CloudFormer stack being created . Once the Status column goes from CREATE_IN_PROGRESS to CREATE_COMPLETE, select it and click on the Outputs tab at the bottom. At that point, you have created the resources needed to use CloudFormer. In order to create a stack with it, do the following: in the Outputs tab (which illustrates the Outputs section of CloudFormation), click on the website URL link. This will open up the CloudFormer tool. Log in using the username and password provided in the fourth step of the previous set of instructions, and you should see something like the following:
- Select the AWS region where you want to create the template and then click on the Create Template button. The following screen will then appear:
- Follow the workflow proposed by the tool to select the different resources that you want for your CloudFormation template, as far as the last step.
- In the end, you will be able to download the generated template or save it directly in S3.
The CloudFormation template generated by CloudFormer will usually need a bit of editing, as you will often want to create a more flexible stack with input parameters and an Outputs section.