{"action":"created","issue":{"url":"https://api.github.com/repos/fog/fog-aws/issues/317","repository_url":"https://api.github.com/repos/fog/fog-aws","labels_url":"https://api.github.com/repos/fog/fog-aws/issues/317/labels{/name}","comments_url":"https://api.github.com/repos/fog/fog-aws/issues/317/comments","events_url":"https://api.github.com/repos/fog/fog-aws/issues/317/events","html_url":"https://github.com/fog/fog-aws/issues/317","id":185009861,"number":317,"title":"Fog not work without pry","user":{"login":"khiem-nguyen","id":12635796,"avatar_url":"https://avatars.githubusercontent.com/u/12635796?v=3","gravatar_id":"","url":"https://api.github.com/users/khiem-nguyen","html_url":"https://github.com/khiem-nguyen","followers_url":"https://api.github.com/users/khiem-nguyen/followers","following_url":"https://api.github.com/users/khiem-nguyen/following{/other_user}","gists_url":"https://api.github.com/users/khiem-nguyen/gists{/gist_id}","starred_url":"https://api.github.com/users/khiem-nguyen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khiem-nguyen/subscriptions","organizations_url":"https://api.github.com/users/khiem-nguyen/orgs","repos_url":"https://api.github.com/users/khiem-nguyen/repos","events_url":"https://api.github.com/users/khiem-nguyen/events{/privacy}","received_events_url":"https://api.github.com/users/khiem-nguyen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-10-25T03:28:04Z","updated_at":"2016-11-09T15:17:27Z","closed_at":null,"body":"I'using fog on my rails app to upload s3 bucket using non full access aws user like this:\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"......\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:ListBucket\"\n            ],\n            \"Resource\": [\n                \"arn:aws:s3:::my_bucket\"\n            ]\n        },\n        {\n            \"Sid\": \".....\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:DeleteObject\",\n                \"s3:GetObject\",\n                \"s3:PutObject\"\n            ],\n            \"Resource\": [\n                \"arn:aws:s3:::my_bucket/*\"\n            ]\n        },\n        {\n            \"Sid\": \".....\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"s3:ListAllMyBuckets\"\n            ],\n            \"Resource\": [\n                \"*\"\n            ]\n        }\n    ]\n}\n```\n\nEverything works ok on console(with pry), but when i changed to production environment(without pry) it not works anymore. When pry was added to Gemfile, it worked again but in web app(without pry).\n\nNote that, everything's ok when I use full access aws user. but here is my customer's bucket, so I cannot modify these permissions\n\nHere is the error\n\n```\nExcon::Error::Forbidden (Expected(200) <=> Actual(403 Forbidden)\nexcon.error.response\n  :body          => \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>436686CA00C867C3</RequestId><HostId>eUpkqyoqqD0/FqdjqhYOdxwSV97GULH1fDx4ce3gn3YIb5vKIDNkuoYjZgeI4/zMqZ8tm+sCNJ0=</HostId></Error>\"\n  :cookies       => [\n  ]\n  :headers       => {\n    \"Connection\"       => \"close\"\n    \"Content-Type\"     => \"application/xml\"\n    \"Date\"             => \"Tue, 25 Oct 2016 03:24:12 GMT\"\n    \"Server\"           => \"AmazonS3\"\n    \"x-amz-id-2\"       => \"eUpkqyoqqD0/FqdjqhYOdxwSV97GULH1fDx4ce3gn3YIb5vKIDNkuoYjZgeI4/zMqZ8tm+sCNJ0=\"\n    \"x-amz-request-id\" => \"436686CA00C867C3\"\n  }\n  :host          => \"s3-ap-northeast-1.amazonaws.com\"\n  :local_address => \"172.21.12.237\"\n  :local_port    => 50649\n  :path          => \"/jpmdco-dev.stg.nenga-maker-print.jp/uploads/nenga-eto/letter/image/1/print_ef4c75c3-ca3b-4684-b8ae-94e4a014820e.jpg\"\n  :port          => 443\n  :reason_phrase => \"Forbidden\"\n  :remote_ip     => \"52.219.16.20\"\n  :status        => 403\n  :status_line   => \"HTTP/1.1 403 Forbidden\\r\\n\"\n):\n```\n"},"comment":{"url":"https://api.github.com/repos/fog/fog-aws/issues/comments/259438608","html_url":"https://github.com/fog/fog-aws/issues/317#issuecomment-259438608","issue_url":"https://api.github.com/repos/fog/fog-aws/issues/317","id":259438608,"user":{"login":"geemus","id":4138,"avatar_url":"https://avatars.githubusercontent.com/u/4138?v=3","gravatar_id":"","url":"https://api.github.com/users/geemus","html_url":"https://github.com/geemus","followers_url":"https://api.github.com/users/geemus/followers","following_url":"https://api.github.com/users/geemus/following{/other_user}","gists_url":"https://api.github.com/users/geemus/gists{/gist_id}","starred_url":"https://api.github.com/users/geemus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geemus/subscriptions","organizations_url":"https://api.github.com/users/geemus/orgs","repos_url":"https://api.github.com/users/geemus/repos","events_url":"https://api.github.com/users/geemus/events{/privacy}","received_events_url":"https://api.github.com/users/geemus/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T15:17:26Z","updated_at":"2016-11-09T15:17:26Z","body":"@khiem-nguyen could you run the working (pry) one with EXCON_DEBUG=true? That should give more detailed HTTP info we can compare against the error (which should hopefully narrow it down). Sorry for the run-around here, just tricky to pin down when we haven't been able to reproduce."}}
{"actor":{"display_login":"geemus"}}