{"action":"closed","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-cloud-aws/issues/230","labels_url":"https://api.github.com/repos/elastic/elasticsearch-cloud-aws/issues/230/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-cloud-aws/issues/230/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-cloud-aws/issues/230/events","html_url":"https://github.com/elastic/elasticsearch-cloud-aws/issues/230","id":99997864,"number":230,"title":"base_path appears to be ignored on S3 bucket","user":{"login":"jsok","id":737907,"avatar_url":"https://avatars.githubusercontent.com/u/737907?v=3","gravatar_id":"","url":"https://api.github.com/users/jsok","html_url":"https://github.com/jsok","followers_url":"https://api.github.com/users/jsok/followers","following_url":"https://api.github.com/users/jsok/following{/other_user}","gists_url":"https://api.github.com/users/jsok/gists{/gist_id}","starred_url":"https://api.github.com/users/jsok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsok/subscriptions","organizations_url":"https://api.github.com/users/jsok/orgs","repos_url":"https://api.github.com/users/jsok/repos","events_url":"https://api.github.com/users/jsok/events{/privacy}","received_events_url":"https://api.github.com/users/jsok/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"dadoonet","id":274222,"avatar_url":"https://avatars.githubusercontent.com/u/274222?v=3","gravatar_id":"","url":"https://api.github.com/users/dadoonet","html_url":"https://github.com/dadoonet","followers_url":"https://api.github.com/users/dadoonet/followers","following_url":"https://api.github.com/users/dadoonet/following{/other_user}","gists_url":"https://api.github.com/users/dadoonet/gists{/gist_id}","starred_url":"https://api.github.com/users/dadoonet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dadoonet/subscriptions","organizations_url":"https://api.github.com/users/dadoonet/orgs","repos_url":"https://api.github.com/users/dadoonet/repos","events_url":"https://api.github.com/users/dadoonet/events{/privacy}","received_events_url":"https://api.github.com/users/dadoonet/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-08-10T07:49:02Z","updated_at":"2015-08-10T09:06:29Z","closed_at":"2015-08-10T09:06:29Z","body":"Hi there,\r\n\r\nI'm running ES 1.6.6 and version 2.6 of this plugin.\r\n\r\nMy `elasticsearch.yml` repositories config looks like:\r\n\r\n```yaml\r\n  repositories:\r\n    s3:\r\n      region: \"ap-southeast-2\"\r\n      bucket: \"my-bucket-name\"\r\n      base_path: \"staging\"\r\n```\r\n\r\nWhen I restrict my IAM policy to only `my-bucket-name/staging/*` (using the policies in the plugin README), I get the error:\r\n\r\n```\r\ncurl -s -XPOST localhost:9200/_snapshot/my-bucket-name/_verify | jq \\.\r\n{\r\n  \"status\": 500,\r\n  \"error\": \"RemoteTransportException[[ip-172-31-3-172-search][inet[/172.31.3.172:9300]][cluster:admin/repository/verify]]; nested: NotSerializableTransportException[[org.elasticsearch.repositories.RepositoryVerificationException] [my-bucket-name] path  is not accessible on master node; Unable to upload object tests-SySrhtH9RjyUA3ja1pFyWg-master; Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 6Axxxxxxx6BF3460); ]; \"\r\n}\r\n```\r\n\r\n\r\nMy suspicion for `base_path` being ignored is the error message from https://github.com/elastic/elasticsearch/blob/master/core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java#L636\r\nThe error message calls `basePath()` however when it's printed above it's an empty string:\r\n```\r\n[my-bucket-name] path   is not accessible on master node\r\n```\r\nIf `base_path` was being setup correctly I would expect the error message to say:\r\n```\r\n[my-bucket-name] path staging is not accessible on master node\r\n```\r\n\r\nIf I loosen my IAM policy to the whole bucket, it happily verifies and creates snapshots but in the root of the bucket (ignoring my `base_path`)!\r\n\r\nI can't find any docs or code to suggest my config is incorrect. Any help would be appreciated, thanks!"}}