Skip to content

Commit e72af19

Browse files
committed
[doc] correct S3 policy for multiparts
for multipart to work correctly you need to also include the necessary actions in the policy. ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:GetBucketLocation", "s3:ListBucketMultipartUploads", "s3:ListBucketVersions" ], "Resource": [ "arn:aws:s3:::yourbucket" ] }, { "Effect": "Allow", "Action": [ "s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:PutObjectAcl", "s3:AbortMultipartUpload", "s3:ListMultipartUploadParts" ], "Resource": [ "arn:aws:s3:::yourbucket/*" ] } ] } ``` Closes elastic#214 (cherry picked from commit 62966ad) (cherry picked from commit 25a37a5)
1 parent 169cde2 commit e72af19

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,10 @@ In order to restrict the Elasticsearch snapshot process to the minimum required
186186
"Statement": [
187187
{
188188
"Action": [
189-
"s3:ListBucket"
189+
"s3:ListBucket",
190+
"s3:GetBucketLocation",
191+
"s3:ListBucketMultipartUploads",
192+
"s3:ListBucketVersions"
190193
],
191194
"Effect": "Allow",
192195
"Resource": [
@@ -197,7 +200,9 @@ In order to restrict the Elasticsearch snapshot process to the minimum required
197200
"Action": [
198201
"s3:GetObject",
199202
"s3:PutObject",
200-
"s3:DeleteObject"
203+
"s3:DeleteObject",
204+
"s3:AbortMultipartUpload",
205+
"s3:ListMultipartUploadParts"
201206
],
202207
"Effect": "Allow",
203208
"Resource": [
@@ -207,7 +212,6 @@ In order to restrict the Elasticsearch snapshot process to the minimum required
207212
],
208213
"Version": "2012-10-17"
209214
}
210-
211215
```
212216

213217
You may further restrict the permissions by specifying a prefix within the bucket, in this example, named "foo".
@@ -217,7 +221,10 @@ You may further restrict the permissions by specifying a prefix within the bucke
217221
"Statement": [
218222
{
219223
"Action": [
220-
"s3:ListBucket"
224+
"s3:ListBucket",
225+
"s3:GetBucketLocation",
226+
"s3:ListBucketMultipartUploads",
227+
"s3:ListBucketVersions"
221228
],
222229
"Condition": {
223230
"StringLike": {
@@ -235,7 +242,9 @@ You may further restrict the permissions by specifying a prefix within the bucke
235242
"Action": [
236243
"s3:GetObject",
237244
"s3:PutObject",
238-
"s3:DeleteObject"
245+
"s3:DeleteObject",
246+
"s3:AbortMultipartUpload",
247+
"s3:ListMultipartUploadParts"
239248
],
240249
"Effect": "Allow",
241250
"Resource": [
@@ -245,7 +254,6 @@ You may further restrict the permissions by specifying a prefix within the bucke
245254
],
246255
"Version": "2012-10-17"
247256
}
248-
249257
```
250258

251259
The bucket needs to exist to register a repository for snapshots. If you did not create the bucket then the repository registration will fail. If you want elasticsearch to create the bucket instead, you can add the permission to create a specific bucket like this:

0 commit comments

Comments
 (0)