You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tidb-cloud/config-s3-and-gcs-access.md
+5-10Lines changed: 5 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,12 @@ If you need to configure these external storages for TiDB Cloud Serverless clust
11
11
12
12
## Configure Amazon S3 access
13
13
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:
15
15
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.
18
18
19
-
<SimpleTab>
20
-
<divlabel="Role ARN">
19
+
### Configure Amazon S3 access using a Role ARN
21
20
22
21
Configure the bucket access for TiDB Cloud and get the Role ARN as follows:
23
22
@@ -127,8 +126,7 @@ Configure the bucket access for TiDB Cloud and get the Role ARN as follows:
127
126
128
127
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.
129
128
130
-
</div>
131
-
<div label="Access Key">
129
+
### Configure Amazon S3 access using an AWS access key
132
130
133
131
It is recommended that you use an IAM user (instead of the AWS account root user) to create an access key.
134
132
@@ -151,9 +149,6 @@ Take the following steps to configure an access key:
151
149
>
152
150
> 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.
153
151
154
-
</div>
155
-
</SimpleTab>
156
-
157
152
## Configure GCS access
158
153
159
154
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.
Copy file name to clipboardExpand all lines: tidb-cloud/serverless-external-storage.md
+19-25Lines changed: 19 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,12 @@ If you need to configure these external storages for a TiDB Cloud Dedicated clus
11
11
12
12
## Configure Amazon S3 access
13
13
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:
15
15
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.
18
18
19
-
<SimpleTab>
20
-
<divlabel="Role ARN">
19
+
### Configure Amazon S3 access using a Role ARN
21
20
22
21
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:
23
22
@@ -34,25 +33,25 @@ It is recommended that you use [AWS CloudFormation](https://docs.aws.amazon.com/
34
33
1. Click **Import from S3**.
35
34
2. Fill in the **File URI** field.
36
35
3. Choose **AWS Role ARN** and click **Click here to create new one with AWS CloudFormation**.
37
-
36
+
38
37
- If you want to export data to Amazon S3, open the **Add New ARN** dialog as follows:
39
38
40
39
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.
41
40
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
+
44
43
3. Create a role ARN with an AWS CloudFormation template.
45
44
46
45
1. In the **Add New ARN** dialog, click **AWS Console with CloudFormation Template**.
47
-
46
+
48
47
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.
49
48
50
49
3. Fill in the **Role Name**.
51
50
52
51
4. Acknowledge to create a new role and click **Create stack** to create the role ARN.
53
52
54
53
5. After the CloudFormation stack is executed, you can click the **Outputs** tab and find the Role ARN value in the **Value** column.
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
65
64
2. In the AWS Management Console, create a managed policy for your Amazon S3 bucket.
66
65
67
66
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
+
69
68
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.
@@ -75,7 +74,7 @@ If you have any trouble creating a role ARN with AWS CloudFormation, you can tak
75
74

76
75
77
76
4. On the **Create policy** page, click the **JSON** tab.
78
-
77
+
79
78
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.
80
79
81
80
- 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
109
108
110
109
In the policy text field, replace the following configurations with your own values.
111
110
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
+
117
116
Make sure that `/*` is added to the end of the directory so TiDB Cloud can access all files in this directory.
118
117
119
118
- `"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
150
149
- 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.
151
150
152
151
3. Click **Next** to open the policy list, choose the policy you just created, and then click **Next**.
153
-
152
+
154
153
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
+
156
155
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.
157
156
158
157

159
158
160
159
</details>
161
160
162
-
</div>
163
-
164
-
<div label="Access Key">
161
+
### Configure Amazon S3 access using an AWS access key
165
162
166
163
It is recommended that you use an IAM user (instead of the AWS account root user) to create an access key.
167
164
@@ -177,9 +174,6 @@ Take the following steps to configure an access key:
177
174
>
178
175
> 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.
179
176
180
-
</div>
181
-
</SimpleTab>
182
-
183
177
## Configure GCS access
184
178
185
179
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