Skip to content

Commit f9a5622

Browse files
authored
cloud: use sections instead of tabs for S3 configuration instructions (#20503)
1 parent 22a38f2 commit f9a5622

2 files changed

Lines changed: 24 additions & 35 deletions

File tree

tidb-cloud/config-s3-and-gcs-access.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ If you need to configure these external storages for TiDB Cloud Serverless clust
1111

1212
## Configure Amazon S3 access
1313

14-
To allow TiDB Cloud to access the source data in your Amazon S3 bucket, you need to configure the bucket access for TiDB Cloud. You can use either of the following methods to configure the bucket access:
14+
To allow a TiDB Cloud Dedicated cluster to access the source data in your Amazon S3 bucket, configure the bucket access for the cluster using either of the following methods:
1515

16-
- Use an AWS access key: use the access key of an IAM user to access your Amazon S3 bucket.
17-
- Use a Role ARN: use a Role ARN to access your Amazon S3 bucket.
16+
- [Use a Role ARN](#configure-amazon-s3-access-using-a-role-arn): use a Role ARN to access your Amazon S3 bucket.
17+
- [Use an AWS access key](#configure-amazon-s3-access-using-an-aws-access-key): use the access key of an IAM user to access your Amazon S3 bucket.
1818

19-
<SimpleTab>
20-
<div label="Role ARN">
19+
### Configure Amazon S3 access using a Role ARN
2120

2221
Configure the bucket access for TiDB Cloud and get the Role ARN as follows:
2322

@@ -127,8 +126,7 @@ Configure the bucket access for TiDB Cloud and get the Role ARN as follows:
127126

128127
4. In the TiDB Cloud console, go to the **Data Import** page where you get the TiDB Cloud account ID and external ID, and then paste the role ARN to the **Role ARN** field.
129128

130-
</div>
131-
<div label="Access Key">
129+
### Configure Amazon S3 access using an AWS access key
132130

133131
It is recommended that you use an IAM user (instead of the AWS account root user) to create an access key.
134132

@@ -151,9 +149,6 @@ Take the following steps to configure an access key:
151149
>
152150
> TiDB Cloud does not store your access keys. It is recommended that you [delete the access key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) after the import is complete.
153151

154-
</div>
155-
</SimpleTab>
156-
157152
## Configure GCS access
158153

159154
To allow TiDB Cloud to access the source data in your GCS bucket, you need to configure the GCS access for the bucket. Once the configuration is done for one TiDB cluster in a project, all TiDB clusters in that project can access the GCS bucket.

tidb-cloud/serverless-external-storage.md

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ If you need to configure these external storages for a TiDB Cloud Dedicated clus
1111

1212
## Configure Amazon S3 access
1313

14-
To allow a TiDB Cloud Serverless cluster to access your Amazon S3 bucket, you need to configure the bucket access for the cluster. You can use either of the following methods to configure the bucket access:
14+
To allow a TiDB Cloud Serverless cluster to access the source data in your Amazon S3 bucket, configure the bucket access for the cluster using either of the following methods:
1515

16-
- Use a Role ARN: use a Role ARN to access your Amazon S3 bucket.
17-
- Use an AWS access key: use the access key of an IAM user to access your Amazon S3 bucket.
16+
- [Use a Role ARN](#configure-amazon-s3-access-using-a-role-arn): use a Role ARN to access your Amazon S3 bucket.
17+
- [Use an AWS access key](#configure-amazon-s3-access-using-an-aws-access-key): use the access key of an IAM user to access your Amazon S3 bucket.
1818

19-
<SimpleTab>
20-
<div label="Role ARN">
19+
### Configure Amazon S3 access using a Role ARN
2120

2221
It is recommended that you use [AWS CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html) to create a role ARN. Take the following steps to create one:
2322

@@ -34,25 +33,25 @@ It is recommended that you use [AWS CloudFormation](https://docs.aws.amazon.com/
3433
1. Click **Import from S3**.
3534
2. Fill in the **File URI** field.
3635
3. Choose **AWS Role ARN** and click **Click here to create new one with AWS CloudFormation**.
37-
36+
3837
- If you want to export data to Amazon S3, open the **Add New ARN** dialog as follows:
3938

4039
1. Click **Export data to...** > **Amazon S3**. If your cluster has neither imported nor exported any data before, click **Click here to export data to...** > **Amazon S3** at the bottom of the page.
4140
2. Fill in the **Folder URI** field.
42-
3. Choose **AWS Role ARN** and click **Click here to create new one with AWS CloudFormation**.
43-
41+
3. Choose **AWS Role ARN** and click **Click here to create new one with AWS CloudFormation**.
42+
4443
3. Create a role ARN with an AWS CloudFormation template.
4544

4645
1. In the **Add New ARN** dialog, click **AWS Console with CloudFormation Template**.
47-
46+
4847
2. Log in to the [AWS Management Console](https://console.aws.amazon.com) and you will be redirected to the AWS CloudFormation **Quick create stack** page.
4948

5049
3. Fill in the **Role Name**.
5150

5251
4. Acknowledge to create a new role and click **Create stack** to create the role ARN.
5352

5453
5. After the CloudFormation stack is executed, you can click the **Outputs** tab and find the Role ARN value in the **Value** column.
55-
54+
5655
![img.png](/media/tidb-cloud/serverless-external-storage/serverless-role-arn.png)
5756

5857
If you have any trouble creating a role ARN with AWS CloudFormation, you can take the following steps to create one manually:
@@ -65,7 +64,7 @@ If you have any trouble creating a role ARN with AWS CloudFormation, you can tak
6564
2. In the AWS Management Console, create a managed policy for your Amazon S3 bucket.
6665

6766
1. Sign in to the [AWS Management Console](https://console.aws.amazon.com/) and open the [Amazon S3 console](https://console.aws.amazon.com/s3/).
68-
67+
6968
2. In the **Buckets** list, choose the name of your bucket with the source data, and then click **Copy ARN** to get your S3 bucket ARN (for example, `arn:aws:s3:::tidb-cloud-source-data`). Take a note of the bucket ARN for later use.
7069

7170
![Copy bucket ARN](/media/tidb-cloud/copy-bucket-arn.png)
@@ -75,7 +74,7 @@ If you have any trouble creating a role ARN with AWS CloudFormation, you can tak
7574
![Create a policy](/media/tidb-cloud/aws-create-policy.png)
7675

7776
4. On the **Create policy** page, click the **JSON** tab.
78-
77+
7978
5. Configure the policy in the policy text field according to your needs. The following is an example that you can use to export data from and import data into a TiDB Cloud Serverless cluster.
8079

8180
- Exporting data from a TiDB Cloud Serverless cluster needs the **s3:PutObject** and **s3:ListBucket** permissions.
@@ -109,11 +108,11 @@ If you have any trouble creating a role ARN with AWS CloudFormation, you can tak
109108

110109
In the policy text field, replace the following configurations with your own values.
111110

112-
- `"Resource": "<Your S3 bucket ARN>/<Directory of the source data>/*"`. For example,
113-
114-
- If your source data is stored in the root directory of the `tidb-cloud-source-data` bucket, use `"Resource": "arn:aws:s3:::tidb-cloud-source-data/*"`.
115-
- If your source data is stored in the `mydata` directory of the bucket, use `"Resource": "arn:aws:s3:::tidb-cloud-source-data/mydata/*"`.
116-
111+
- `"Resource": "<Your S3 bucket ARN>/<Directory of the source data>/*"`. For example:
112+
113+
- If your source data is stored in the root directory of the `tidb-cloud-source-data` bucket, use `"Resource": "arn:aws:s3:::tidb-cloud-source-data/*"`.
114+
- If your source data is stored in the `mydata` directory of the bucket, use `"Resource": "arn:aws:s3:::tidb-cloud-source-data/mydata/*"`.
115+
117116
Make sure that `/*` is added to the end of the directory so TiDB Cloud can access all files in this directory.
118117

119118
- `"Resource": "<Your S3 bucket ARN>"`, for example, `"Resource": "arn:aws:s3:::tidb-cloud-source-data"`.
@@ -150,18 +149,16 @@ If you have any trouble creating a role ARN with AWS CloudFormation, you can tak
150149
- In **Options**, click **Require external ID (Best practice when a third party will assume this role)**, and then paste the TiDB Cloud External ID to the **External ID** field. If the role is created without a Require external ID, once the configuration is done for one TiDB cluster in a project, all TiDB clusters in that project can use the same Role ARN to access your Amazon S3 bucket. If the role is created with the account ID and external ID, only the corresponding TiDB cluster can access the bucket.
151150

152151
3. Click **Next** to open the policy list, choose the policy you just created, and then click **Next**.
153-
152+
154153
4. In **Role details**, set a name for the role, and then click **Create role** in the lower-right corner. After the role is created, the list of roles is displayed.
155-
154+
156155
5. In the list of roles, click the name of the role that you just created to go to its summary page, and then you can get the role ARN.
157156

158157
![Copy AWS role ARN](/media/tidb-cloud/aws-role-arn.png)
159158

160159
</details>
161160

162-
</div>
163-
164-
<div label="Access Key">
161+
### Configure Amazon S3 access using an AWS access key
165162

166163
It is recommended that you use an IAM user (instead of the AWS account root user) to create an access key.
167164

@@ -177,9 +174,6 @@ Take the following steps to configure an access key:
177174
>
178175
> TiDB Cloud does not store your access keys. It is recommended that you [delete the access key](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey) after the import or export is complete.
179176

180-
</div>
181-
</SimpleTab>
182-
183177
## Configure GCS access
184178

185179
To allow a TiDB Cloud Serverless cluster to access your GCS bucket, you need to configure the GCS access for the bucket. You can use a service account key to configure the bucket access:

0 commit comments

Comments
 (0)