{"action":"closed","issue":{"url":"https://api.github.com/repos/hashicorp/vault/issues/1281","repository_url":"https://api.github.com/repos/hashicorp/vault","labels_url":"https://api.github.com/repos/hashicorp/vault/issues/1281/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/vault/issues/1281/comments","events_url":"https://api.github.com/repos/hashicorp/vault/issues/1281/events","html_url":"https://github.com/hashicorp/vault/issues/1281","id":145050270,"number":1281,"title":"S3 backend has troubles with regions other us-east-1","user":{"login":"SunSparc","id":1380473,"avatar_url":"https://avatars.githubusercontent.com/u/1380473?v=3","gravatar_id":"","url":"https://api.github.com/users/SunSparc","html_url":"https://github.com/SunSparc","followers_url":"https://api.github.com/users/SunSparc/followers","following_url":"https://api.github.com/users/SunSparc/following{/other_user}","gists_url":"https://api.github.com/users/SunSparc/gists{/gist_id}","starred_url":"https://api.github.com/users/SunSparc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SunSparc/subscriptions","organizations_url":"https://api.github.com/users/SunSparc/orgs","repos_url":"https://api.github.com/users/SunSparc/repos","events_url":"https://api.github.com/users/SunSparc/events{/privacy}","received_events_url":"https://api.github.com/users/SunSparc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-01T00:08:10Z","updated_at":"2016-04-15T20:57:35Z","closed_at":"2016-04-15T20:57:35Z","body":"_Note: This was tested against version 5.2 (which is 15 days old as of this posting)._\r\n\r\nI setup Vault to use S3 as the backend. I created two buckets. One bucket was in the us-east-1 (aka \"US Standard\") region and the other was in us-east-2 (Oregon). I setup IAM permissions for a user. I setup my vault config files on two different machines.\r\n\r\n    backend \"s3\" {\r\n      bucket = \"myvault-east\" // and bucket = \"myvault-west\"\r\n      access_key = \"*********************\"\r\n      secret_key = \"****************************************\"\r\n    }\r\n    listener \"tcp\" {\r\n      address = \"0.0.0.0:8200\"\r\n      tls_disable = 1\r\n    }\r\n\r\nThen I launched the Vault server: `sudo vault server -config=vault.hcl`.\r\n\r\nOn the server using the S3 bucket in the East, everything was fine. I initialized the server and the files showed up in the bucket without problem.\r\n\r\nOn the server using the S3 bucket in the West, I got this message:\r\n\r\n    Error initializing backend of type s3: unable to access bucket 'myyvault-west': :\r\n        status code: 403, request id: 12345678901234567\r\n\r\nI check the permissions over and over. They were fine.\r\n\r\nThen I installed `s3cmd` on the machine with the West config and tried to access the same bucket. This is what I saw:\r\n\r\n    $ s3cmd ls s3://myyvault-west\r\n    WARNING: Redirected to: myvault-west.s3-us-west-2.amazonaws.com\r\n\r\nApparently since East is the \"Standard\" region for S3, there are no redirects. But the West regions do. Perhaps the S3 backend for Vault is not handling these redirects properly.\r\n\r\nJust for kicks, I setup a bucket in us-west-1 (Northern California) as well and got the same problem."}}