Skip to content

Commit 62966ad

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
1 parent df53c9a commit 62966ad

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
@@ -178,7 +178,10 @@ In order to restrict the Elasticsearch snapshot process to the minimum required
178178
"Statement": [
179179
{
180180
"Action": [
181-
"s3:ListBucket"
181+
"s3:ListBucket",
182+
"s3:GetBucketLocation",
183+
"s3:ListBucketMultipartUploads",
184+
"s3:ListBucketVersions"
182185
],
183186
"Effect": "Allow",
184187
"Resource": [
@@ -189,7 +192,9 @@ In order to restrict the Elasticsearch snapshot process to the minimum required
189192
"Action": [
190193
"s3:GetObject",
191194
"s3:PutObject",
192-
"s3:DeleteObject"
195+
"s3:DeleteObject",
196+
"s3:AbortMultipartUpload",
197+
"s3:ListMultipartUploadParts"
193198
],
194199
"Effect": "Allow",
195200
"Resource": [
@@ -199,7 +204,6 @@ In order to restrict the Elasticsearch snapshot process to the minimum required
199204
],
200205
"Version": "2012-10-17"
201206
}
202-
203207
```
204208

205209
You may further restrict the permissions by specifying a prefix within the bucket, in this example, named "foo".
@@ -209,7 +213,10 @@ You may further restrict the permissions by specifying a prefix within the bucke
209213
"Statement": [
210214
{
211215
"Action": [
212-
"s3:ListBucket"
216+
"s3:ListBucket",
217+
"s3:GetBucketLocation",
218+
"s3:ListBucketMultipartUploads",
219+
"s3:ListBucketVersions"
213220
],
214221
"Condition": {
215222
"StringLike": {
@@ -227,7 +234,9 @@ You may further restrict the permissions by specifying a prefix within the bucke
227234
"Action": [
228235
"s3:GetObject",
229236
"s3:PutObject",
230-
"s3:DeleteObject"
237+
"s3:DeleteObject",
238+
"s3:AbortMultipartUpload",
239+
"s3:ListMultipartUploadParts"
231240
],
232241
"Effect": "Allow",
233242
"Resource": [
@@ -237,7 +246,6 @@ You may further restrict the permissions by specifying a prefix within the bucke
237246
],
238247
"Version": "2012-10-17"
239248
}
240-
241249
```
242250

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