Skip to content

Commit 3f63019

Browse files
authored
Merge pull request #4667 from ClickHouse/tp/kinesis-update-secure-iam-role
Cleanup kinesis iam role for clickpipes
2 parents 4bc48ba + 0ebcad5 commit 3f63019

File tree

1 file changed

+65
-45
lines changed

1 file changed

+65
-45
lines changed

docs/integrations/data-ingestion/clickpipes/secure-kinesis.md

Lines changed: 65 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -49,50 +49,70 @@ Using this approach, customers can manage all access to their Kinesis data strea
4949
- 2. Browse to IAM Service Console
5050
- 3. Create a new IAM role with Trusted Entity Type of `AWS account`. Note that the name of the IAM role **must start with** `ClickHouseAccessRole-` for this to work.
5151

52-
For the trust policy, please replace `{ClickHouse_IAM_ARN}` with the IAM Role arn belong to your ClickHouse instance.
53-
For the IAM policy, please replace `{STREAM_NAME}` with your Kinesis stream name.
54-
55-
```json
56-
{
57-
"Version": "2012-10-17",
58-
"Statement": [
59-
{
60-
"Sid": "Statement1",
61-
"Effect": "Allow",
62-
"Principal": {
63-
"AWS": "{ClickHouse_IAM_ARN}"
64-
},
65-
"Action": "sts:AssumeRole"
66-
},
67-
{
68-
"Action": [
69-
"kinesis:DescribeStream",
70-
"kinesis:GetShardIterator",
71-
"kinesis:GetRecords",
72-
"kinesis:ListShards",
73-
"kinesis:SubscribeToShard",
74-
"kinesis:DescribeStreamConsumer",
75-
"kinesis:RegisterStreamConsumer",
76-
"kinesis:DeregisterStreamConsumer",
77-
"kinesis:ListStreamConsumers"
78-
],
79-
"Resource": [
80-
"arn:aws:kinesis:region:account-id:stream/{STREAM_NAME}/*"
81-
],
82-
"Effect": "Allow"
83-
},
84-
{
85-
"Action": [
86-
"kinesis:ListStreams"
87-
],
88-
"Resource": "*",
89-
"Effect": "Allow"
90-
}
91-
]
92-
}
93-
94-
</VerticalStepper>
95-
96-
```
52+
**i. Configure the Trust Policy**
53+
54+
The trust policy allows the ClickHouse IAM role to assume this role. Replace `{ClickHouse_IAM_ARN}` with the IAM Role ARN from your ClickHouse service (obtained in the previous step).
55+
56+
```json
57+
{
58+
"Version": "2012-10-17",
59+
"Statement": [
60+
{
61+
"Effect": "Allow",
62+
"Principal": {
63+
"AWS": "{ClickHouse_IAM_ARN}"
64+
},
65+
"Action": "sts:AssumeRole"
66+
}
67+
]
68+
}
69+
```
70+
71+
**ii. Configure the Permission Policy**
72+
73+
The permission policy grants access to your Kinesis stream. Replace the following placeholders:
74+
- `{REGION}`: Your AWS region (e.g., `us-east-1`)
75+
- `{ACCOUNT_ID}`: Your AWS account ID
76+
- `{STREAM_NAME}`: Your Kinesis stream name
77+
78+
```json
79+
{
80+
"Version": "2012-10-17",
81+
"Statement": [
82+
{
83+
"Effect": "Allow",
84+
"Action": [
85+
"kinesis:DescribeStream",
86+
"kinesis:GetShardIterator",
87+
"kinesis:GetRecords",
88+
"kinesis:ListShards",
89+
"kinesis:RegisterStreamConsumer",
90+
"kinesis:DeregisterStreamConsumer",
91+
"kinesis:ListStreamConsumers"
92+
],
93+
"Resource": [
94+
"arn:aws:kinesis:{REGION}:{ACCOUNT_ID}:stream/{STREAM_NAME}"
95+
]
96+
},
97+
{
98+
"Effect": "Allow",
99+
"Action": [
100+
"kinesis:SubscribeToShard",
101+
"kinesis:DescribeStreamConsumer"
102+
],
103+
"Resource": [
104+
"arn:aws:kinesis:{REGION}:{ACCOUNT_ID}:stream/{STREAM_NAME}/*"
105+
]
106+
},
107+
{
108+
"Effect": "Allow",
109+
"Action": [
110+
"kinesis:ListStreams"
111+
],
112+
"Resource": "*"
113+
}
114+
]
115+
}
116+
```
97117

98118
- 4. Copy the new **IAM Role Arn** after creation. This is what is needed to access your Kinesis stream.

0 commit comments

Comments
 (0)