// Module included in the following assemblies:
//
// * machine_management/user_infra/adding-aws-compute-user-infra.adoc

:_mod-docs-content-type: PROCEDURE
[id="machine-adding-aws-compute-cloudformation_{context}"]
= Adding more compute machines to your AWS cluster by using CloudFormation templates

[role="_abstract"]
To scale your {product-title} cluster on Amazon Web Services (AWS), you can add more compute machines by creating additional CloudFormation stacks from the sample templates that you used during installation.

[IMPORTANT]
====
The CloudFormation template creates a stack that represents one compute machine. You must create a stack for each compute machine.
====

[NOTE]
====
If you do not use the provided CloudFormation template to create your compute nodes, you must review the provided information and manually create the infrastructure. If your cluster does not initialize correctly, you might have to contact Red Hat support with your installation logs.
====

.Prerequisites

* You installed an {product-title} cluster by using CloudFormation templates and have access to the JSON file and CloudFormation template that you used to create the compute machines during cluster installation.
* You installed the AWS CLI.

.Procedure

. Create another compute stack.
.. Launch the template:
+
[source,terminal]
----
$ aws cloudformation create-stack --stack-name <name>
     --template-body file://<template>.yaml
     --parameters file://<parameters>.json
----
+
* `<name>` is the name for the CloudFormation stack, such as `cluster-workers`. You must provide the name of this stack if you remove the cluster.
* `<template>` is the relative path to and name of the CloudFormation template YAML file that you saved.
* `<parameters>` is the relative path to and name of the CloudFormation parameters JSON file.

.. Confirm that the template components exist:
+
[source,terminal]
----
$ aws cloudformation describe-stacks --stack-name <name>
----

. Continue to create compute stacks until you have created enough compute machines for your cluster.
