Skip to content

Commit 9206b0d

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) (cherry picked from commit e72af19)
1 parent 551f2da commit 9206b0d

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
@@ -210,7 +210,10 @@ In order to restrict the Elasticsearch snapshot process to the minimum required
210210
"Statement": [
211211
{
212212
"Action": [
213-
"s3:ListBucket"
213+
"s3:ListBucket",
214+
"s3:GetBucketLocation",
215+
"s3:ListBucketMultipartUploads",
216+
"s3:ListBucketVersions"
214217
],
215218
"Effect": "Allow",
216219
"Resource": [
@@ -221,7 +224,9 @@ In order to restrict the Elasticsearch snapshot process to the minimum required
221224
"Action": [
222225
"s3:GetObject",
223226
"s3:PutObject",
224-
"s3:DeleteObject"
227+
"s3:DeleteObject",
228+
"s3:AbortMultipartUpload",
229+
"s3:ListMultipartUploadParts"
225230
],
226231
"Effect": "Allow",
227232
"Resource": [
@@ -231,7 +236,6 @@ In order to restrict the Elasticsearch snapshot process to the minimum required
231236
],
232237
"Version": "2012-10-17"
233238
}
234-
235239
```
236240

237241
You may further restrict the permissions by specifying a prefix within the bucket, in this example, named "foo".
@@ -241,7 +245,10 @@ You may further restrict the permissions by specifying a prefix within the bucke
241245
"Statement": [
242246
{
243247
"Action": [
244-
"s3:ListBucket"
248+
"s3:ListBucket",
249+
"s3:GetBucketLocation",
250+
"s3:ListBucketMultipartUploads",
251+
"s3:ListBucketVersions"
245252
],
246253
"Condition": {
247254
"StringLike": {
@@ -259,7 +266,9 @@ You may further restrict the permissions by specifying a prefix within the bucke
259266
"Action": [
260267
"s3:GetObject",
261268
"s3:PutObject",
262-
"s3:DeleteObject"
269+
"s3:DeleteObject",
270+
"s3:AbortMultipartUpload",
271+
"s3:ListMultipartUploadParts"
263272
],
264273
"Effect": "Allow",
265274
"Resource": [
@@ -269,7 +278,6 @@ You may further restrict the permissions by specifying a prefix within the bucke
269278
],
270279
"Version": "2012-10-17"
271280
}
272-
273281
```
274282

275283
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)