Skip to content

Commit 150b443

Browse files
authored
docs(s3.md): add example Policy to allow access to S3 & SQS
1 parent 9474ccb commit 150b443

File tree

1 file changed

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

1 file changed

+31
-0
lines changed

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,34 @@ 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:*"
150+
],
151+
"Effect": "Allow",
152+
"Resource": "arn:aws:sqs:::test-sqs-s3-acquis"
153+
},
154+
{
155+
"Effect": "Allow",
156+
"Action": [
157+
"s3:*",
158+
"s3-object-lambda:*"
159+
],
160+
"Resource": "arn:aws:s3:::my_bucket:*"
161+
}
162+
],
163+
"Version": "2012-10-17"
164+
}
165+
```
166+
167+
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)