Manually scaling a running Presto cluster#

Using the CloudFormation template, you can scale your cluster up and down to match demand. Alternatively you can use automatic scaling.

Add or remove workers using the AWS CloudFormation console#

1. CloudFormation console Navigate to the CloudFormation Console under “Management Tools” within the Services menu.

2. Choose a stack Select the Presto cluster (CloudFormation stack) you wish to alter.

3. Actions menu Navigate to the Actions drop-down menu and click “Update Stack”.

4. Select template Once you have arrived at the Select Template page within your stack update, you can find a pre-populated field under “Amazon S3 template URL”. Click “next”. Note, selecting “Use current template” achieves the same result.


5. Specify details Within the Specify Details page navigate to the “Workers Count” field and increase and decrease the node count to meet your needs.


6. Review and update Navigate through to the Review page and look over your changes. When content, click “Update” to conclude the up-scale/down-scale of your cluster.

Add and remove an instance using the AWS CLI#

1. Open a terminal window Open a terminal window to begin a command line.

2. Update stack Use the update stack command to initiate the update of your cluster (CloudFormation stack).

aws cloudformation update-stack

3. Choose a stack Specify the name or unique stack ID of the cluster to update.

--stack-name (string)

4. Select template Indicate the template you used to create your cluster.

Set Previous: Reuse the existing template that is associated with the cluster that you are updating. Set UsePreviousTemplate to true.


5. Add or remove instances Specify a new value for the WorkersCount parameter and indicate to the AWS CLI that you do not want to change value of any other parameters.

ParameterKey=WorkersCount,ParameterValue= 1

Reference the Example section below for a complete example of what to enter into the CLI.

6. Review and update Finally, review the details of your cluster and your commands. When content, proceed by pressing enter to finish updating your cluster.

See the following create-stacks command as a reference for your cluster update:

 aws cloudformation update-stack \
 --stack-name teststack \
 --use-previous-template \
 --parameters \
 "ParameterKey=VPC,UsePreviousValue=true" \
 "ParameterKey=Subnet,UsePreviousValue=true" \
 "ParameterKey=SecurityGroups,UsePreviousValue=true" \
 "ParameterKey=WorkersInstanceType,UsePreviousValue=true" \
 "ParameterKey=KeyName,UsePreviousValue=true" \
 "ParameterKey=IamInstanceProfile,UsePreviousValue=true" \
 "ParameterKey=WorkersCount,ParameterValue=3" \
 "ParameterKey=LaunchSuperset,UsePreviousValue=true" \
 "ParameterKey=MetastoreType,UsePreviousValue=true" \
 "ParameterKey=ExternalMetastoreHost,UsePreviousValue=true" \
 "ParameterKey=ExternalMetastorePort,UsePreviousValue=true" \
 "ParameterKey=ExternalRdbmsMetastoreUserName,UsePreviousValue=true" \
 "ParameterKey=ExternalRdbmsMetastorePassword,UsePreviousValue=true" \
 "ParameterKey=ExternalRdbmsMetastoreDatabaseName,UsePreviousValue=true" \
 "ParameterKey=AdditionalCoordinatorConfigurationURI,UsePreviousValue=true" \
 "ParameterKey=AdditionalWorkersConfigurationURI,UsePreviousValue=true" \

The above commands yield output like the following: