Skip to content

Commit 727dd99

Browse files
authored
docs(s3.md): add example Policy to allow access to S3 & SQS (#852)
* docs(s3.md): add example Policy to allow access to S3 & SQS * Update crowdsec-docs/docs/log_processor/data_sources/s3.md: only need s3 * Update crowdsec-docs/docs/log_processor/data_sources/s3.md: more precise permissions * Update crowdsec-docs/docs/log_processor/data_sources/s3.md: SQS precise premissions
1 parent 741ce6e commit 727dd99

File tree

1 file changed

+37
-0
lines changed
  • crowdsec-docs/docs/log_processor/data_sources

1 file changed

+37
-0
lines changed

crowdsec-docs/docs/log_processor/data_sources/s3.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,40 @@ crowdsec -type syslog -dsn s3://my_bucket/my_prefix/foo.log?log_level=debug
134134
```
135135

136136
AWS SDK behaviour can be configured with the standard AWS environment variables.
137+
138+
139+
## IAM Permissions
140+
141+
Because the component needs to interact with AWS resources, it need the proper permissions.
142+
143+
Here is the set of required permissions:
144+
```json
145+
{
146+
"Statement": [
147+
{
148+
"Action": [
149+
"sqs:ReceiveMessage",
150+
"sqs:DeleteMessage",
151+
"sqs:GetQueueAttributes",
152+
"sqs:GetQueueUrl",
153+
"sqs:ListDeadLetterSourceQueues",
154+
"sqs:ListQueues"
155+
],
156+
"Effect": "Allow",
157+
"Resource": "arn:aws:sqs:::test-sqs-s3-acquis"
158+
},
159+
{
160+
"Effect": "Allow",
161+
"Action": [
162+
"s3:DescribeJob",
163+
"s3:Get*",
164+
"s3:List*"
165+
],
166+
"Resource": "arn:aws:s3:::my_bucket:*"
167+
}
168+
],
169+
"Version": "2012-10-17"
170+
}
171+
```
172+
173+
For the permissions, we recommend to restrict the S3 permissions to read only operations, to avoid the ability to destroy logs from the CrowdSec agent. If you are using S3 polling, the SQS part of the permissions can be omitted.

0 commit comments

Comments
 (0)