Project: StarRocks (App Definition and Development / Database)
File: starrocks_on_aws.md

displayed_sidebar: "English" StarRocks and AWS provide to quickly deploy StarRocks on AWS. This topic provides step-by-step instructions to help you deploy and access StarRocks. AWS Partner Solutions are automated reference deployments built by AWS solutions architects and AWS Partners. AWS Partner Solutions uses templates that automatically deploy AWS resources and third-party resources, such as StarRocks clusters, on the AWS Cloud. Templates are JSON or YAML formatted text files that describe AWS resources and third-party resources, as well as the properties of those resources. Stacks are used to create and manage the resources described in templates. You can create, update, and delete a set of resources by creating, updating, and deleting a stack. All resources in a stack are defined by a template. Suppose you have created a template that describes various resources. To configure these resources, you need to create a stack by submitting the template that you created, and AWS CloudFormation then configures all those resources for you. Sign in to . If you don't have an account, sign up at . Choose the AWS Region from the top toolbar. Choose a deployment option to launch this . The AWS CloudFormation console opens with a prepopulated template which is used to deploy a StarRocks cluster with one FE and three BEs. Deployment takes about 30 minutes to complete. . This option builds a new AWS environment that consists of a VPC, subnets, NAT gateways, security groups, bastion hosts, and other infrastructure components. It then deploys StarRocks into this new VPC. . This option provisions StarRocks in your existing AWS infrastructure. Choose the correct AWS Region. On the Create stack page, keep the default setting for the template URL, and then choose Next. On the Specify stack details page Customize the stack name if needed. Configure and review the parameters for the template. Configure the required parameters. When you choose to deploy StarRocks into a new VPC, pay attention to the following parameters. | Type | Parameter | Required | Description | | - | - | - | | | Network configuration | Availability Zones | Yes | Select two availability zones for deploying the StarRocks cluster. For more information, see . | | EC2 configuration | Key pair name | Yes | Enter a key pair, consisting of a public key and a private key, is a set of security credentials that you use to prove your identity when you connect to EC2 instances. For more information, see . > Note > > If you need to create a key pair, see . | | StarRocks cluster configuration | Root Password of Starrock | Yes | Enter the password of your StarRocks root account. You need to provide the password when you connect to the StarRocks cluster by using the root account. | | |Confirm Root Password | Yes | Confirm the password of your StarRocks root

| | When you choose to deploy StarRocks into an existing VPC, pay attention to the following parameters: | Type | Parameter | Required | Description | | - | - | | | | Network configuration | VPC ID | Yes | Enter the ID of your existing VPC. Make sure that you . | | |Private subnet 1 ID | Yes | Enter the ID of the private subnet in Availability Zone 1 of your existing VPC (for example, subnet-fe9a8b32). | | | |Public subnet 1 ID | Yes | Enter the ID of the public subnet in Availability Zone 1 of your existing VPC. | | | |Public subnet 2 ID | Yes | Enter the ID of the public subnet in Availability Zone 2 of your existing VPC. | | | EC2 configuration | Key pair name | Yes | Enter a key pair, consisting of a public key and a private key, is a set of security credentials that you use to prove your identity when you connect to EC2 instances. For more information, see . <br /> NOTE <br /> If you need to create a key pair, see . | | StarRocks cluster configuration | Root Password of Starrock | Yes | Enter the password of your StarRocks root account. You need to provide the password when you connect to the StarRocks cluster by using the root account. | | |Confirm Root Password | Yes | Confirm the password of your StarRocks root account. | | For other parameters, review the default settings and customize them as necessary. When you finish configuring and reviewing the parameters, choose Next. On the Configure stack options page, keep the default settings and click Next. On the Review starrocks-starrocks page, review the stack information configured above, including the template, details, and more options. For more information, see . > NOTE > > If you need to change any of the parameters, click Edit on the top right corner of the related section to go back to the relevant page. Select the following two check boxes and click Create stack. Note that you are responsible for the cost of the AWS services and any third-party licenses used while running this Partner Solution. For cost estimates, refer to the pricing pages for each AWS service you use. Because the StarRocks cluster is deployed into a private subnet, you need to first connect to an EC2 Bastion Host and then access the StarRocks cluster. Connect to the EC2 Bastion Host that is used to access the StarRocks cluster. From the AWS CloudFormation console, on the Outputs tab for `BastionStack`, note the value for `EIP1` down. From the EC2 console, choose the EC2 Bastion Host. Edit the inbound rule for the security group associated with the EC2 Bastion Host, to allow traffic from your machine to the EC2 Bastion Host. Connect to the EC2 Bastion Host. Access the StarRocks cluster Install MySQL on the EC2 Bastion Host. Use the following command to connect the StarRocks cluster: ```Bash mysql -u root -h 10.0.xx.xx -P 9030 -p ``` host: You can find the FE's private IP address according to the following steps: From the AWS CloudFormation console, on the Outputs tab for `StarRocksClusterStack`, click the value for `FeLeaderInstance`. From the instance summary page, find the FE's private IP address. password: enter the password you configure in step 5.