Skip to content

Commit f393d95

Browse files
authored
Merge pull request #3163 from emqx/r588-s3-connector
update(S3): Update config method for access keys
2 parents bba8308 + 310f78e commit f393d95

File tree

2 files changed

+33
-9
lines changed
  • en_US/data-integration
  • zh_CN/data-integration

2 files changed

+33
-9
lines changed

en_US/data-integration/s3.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ EMQX supports Amazon S3 and other S3-compatible storage services. You can use AW
6868

6969
1. In the [AWS S3 Console](https://console.amazonaws.cn/s3/home), click the **Create bucket** button. Follow the instructions to enter the relevant information, such as bucket name and region, to create an S3 bucket. For detailed operations, refer to the [AWS Documentation](https://docs.amazonaws.cn/AmazonS3/latest/userguide/creating-bucket.html).
7070
2. Set bucket permissions. After the bucket is created successfully, select the bucket and click the **Permissions** tab. Based on your needs, you can set the bucket to public read/write, private, or other permissions.
71-
3. Obtain access keys. In the AWS Console, search for and select the **IAM** service. Create a new user for S3 and obtain the Access Key and Secret Key.
71+
3. Obtain access keys.
72+
- **Manual Configuration**: In the AWS Console, search for and select the **IAM** service. Create a new user for S3 and obtain the Access Key ID and Secret Access Key. See [AWS guide: Managing access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html).
73+
- **Automatic Retrieval (EC2 only)**: If EMQX is running on **AWS EC2**, [attach an **IAM role**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html) with sufficient permissions. EMQX can automatically fetch temporary credentials from Instance Metadata via [**IMDSv2** API](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-metadata-security-credentials.html).
7274

7375
With the Amazon S3 bucket created and configured, you are now ready to create an Amazon S3 Sink in EMQX.
7476

@@ -109,13 +111,18 @@ Before adding the S3 Sink, you need to create the corresponding connector.
109111

110112
1. Go to the Dashboard **Integration** -> **Connector** page.
111113
2. Click the **Create** button in the top right corner.
112-
3. Select **Amazon S3** as the connector type and click next.
113-
4. Enter the connector name, a combination of upper and lowercase letters and numbers. Here, enter `my-s3`.
114+
3. Select **Amazon S3** as the connector type and click **Next**.
115+
4. Enter a name for the connector. The name must start with a letter or number and can contain letters, numbers, hyphens, or underscores. In this example, enter `my-s3`.
114116
5. Enter the connection information.
115117
- If you are using the Amazon S3 bucket, enter the following information:
116118
- **Host**: The host varies by region and is formatted as `s3.{region}.amazonaws.com`.
117119
- **Port**: Enter `443`.
118-
- **Access Key ID** and **Secret Access Key**: Enter the access keys created in AWS.
120+
- **Access Key ID** and **Secret Access Key**:
121+
122+
- Enter the access keys created in AWS, or
123+
- Leave blank if running EMQX on EC2 with an attached IAM role.
124+
125+
See the "Amazon S3" tab in [Prepare S3 Bucket](#prepare-s3-bucket) for details.
119126
- If you are using MinIO, enter the following information:
120127
- **Host**: Enter `127.0.0.1`. If you are running MinIO remotely, enter the actual host address.
121128
- **Port**: Enter `9000`.

zh_CN/data-integration/s3.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ EMQX 支持 Amazon S3 以及兼容 S3 的存储服务,您可以使用 AWS 云
6767

6868
1.[AWS S3 控制台](https://console.amazonaws.cn/s3/home)中,点击**创建存储桶**按钮。然后按照向导的指示填写相关信息,如存储桶名称(例如 `iot-data`)、区域等,创建一个 S3 存储桶。详细操作可参考 [AWS 文档](https://docs.amazonaws.cn/AmazonS3/latest/userguide/creating-bucket.html)
6969
2. 设置存储桶权限:在存储桶创建成功后,选择该存储桶,并点击**权限**选项卡,根据需求可以为存储桶选择公共读写、私有等权限。
70-
3. 获取访问密钥:在 AWS 控制台中,搜索并选择 **IAM** 服务,为 S3 创建一个新的用户,获取 Access Key 和 Secret Key。
70+
3. 获取访问密钥:
71+
- **手动配置**:在 AWS 控制台中搜索并选择 **IAM** 服务,为 S3 创建新的用户,并获取**访问密钥 ID****访问密钥**。参见 [AWS 指南:管理访问密钥](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html)
72+
- **自动获取(仅适用于 EC2)**:如果 EMQX 运行在 **AWS EC2** 上,请为实例绑定具备足够权限的 **IAM 角色**。EMQX 将通过 **IMDSv2** 自动获取临时凭证。参见 [AWS 指南:对 Amazon EC2 上的应用程序使用角色](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2.html)
7173

7274
至此,您已经完成了 S3 存储桶的创建与配置,接下来我们将在 EMQX 中创建 Amazon S3 Sink。
7375

@@ -107,11 +109,26 @@ EMQX 支持 Amazon S3 以及兼容 S3 的存储服务,您可以使用 AWS 云
107109

108110
1. 转到 Dashboard **集成** -> **连接器**页面。
109111
2. 点击页面右上角的**创建**
110-
3. 在连接器类型中选择 **Amazon S3**点击下一步
111-
4. 输入连接器名称,要求是大小写英文字母和数字的组合。这里我们输入 `my-s3`
112+
3. 在连接器类型中选择 **Amazon S3**点击**下一步**
113+
4. 输入连接器名称。名称必须以字母或数字开头,可以包含字母、数字、连字符或下划线。例如: `my-s3`
112114
5. 输入连接信息:
113-
- 对于 AWS S3:**主机**根据区域不同,格式为 `s3.{region}.amazonaws.com`**端口**填写 `443`**访问密钥 ID****私有访问密钥**填写 AWS 中创建的访问密钥。
114-
- 对于 MinIO:**主机**填写 `127.0.0.1` (如果 MinIO 在远程运行,填写实际地址),**端口**填写 `9000`**访问密钥 ID****私有访问密钥**填写 MinIO 中创建的访问密钥。
115+
- 如果使用 AWS S3 存储桶,请输入以下信息:
116+
117+
- **主机**:根据区域不同,格式为 `s3.{region}.amazonaws.com`
118+
119+
- **端口**:填写 `443`
120+
121+
- **访问密钥 ID****私有访问密钥**
122+
123+
- 填写在 AWS 中创建的访问密钥,或者
124+
- 如果 EMQX 运行在已绑定 IAM 角色的 EC2 上,可留空。
125+
126+
详细说明请参见[准备 S3 存储桶](#准备-s3-存储桶)中的 Amazon S3 标签页。
127+
- 如果使用 MinIO:
128+
129+
- **主机**:填写 `127.0.0.1` (如果 MinIO 在远程运行,填写实际地址)。
130+
- **端口**:填写 `9000`
131+
- **访问密钥 ID****私有访问密钥**:填写 MinIO 中创建的访问密钥。
115132
6. 点击**创建**之前,您可以先点击**测试连接**来测试连接器是否可以连接到 S3 服务。
116133
7. 点击最下方**创建**按钮完成连接器创建。
117134

0 commit comments

Comments
 (0)