{"action":"created","issue":{"url":"https://api.github.com/repos/mathcamp/pypicloud/issues/38","labels_url":"https://api.github.com/repos/mathcamp/pypicloud/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/mathcamp/pypicloud/issues/38/comments","events_url":"https://api.github.com/repos/mathcamp/pypicloud/issues/38/events","html_url":"https://github.com/mathcamp/pypicloud/issues/38","id":48569499,"number":38,"title":"S3 download links stop working early with IAM roles","user":{"login":"dmaze","id":2312659,"avatar_url":"https://avatars.githubusercontent.com/u/2312659?v=3","gravatar_id":"","url":"https://api.github.com/users/dmaze","html_url":"https://github.com/dmaze","followers_url":"https://api.github.com/users/dmaze/followers","following_url":"https://api.github.com/users/dmaze/following{/other_user}","gists_url":"https://api.github.com/users/dmaze/gists{/gist_id}","starred_url":"https://api.github.com/users/dmaze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmaze/subscriptions","organizations_url":"https://api.github.com/users/dmaze/orgs","repos_url":"https://api.github.com/users/dmaze/repos","events_url":"https://api.github.com/users/dmaze/events{/privacy}","received_events_url":"https://api.github.com/users/dmaze/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-11-12T22:07:59Z","updated_at":"2015-02-06T10:44:08Z","closed_at":null,"body":"I have pypicloud set up using the default local SQLite database and with S3 package storage.  Rather than putting the AWS credentials in plain text in the pypicloud.ini file, the system running the server has an IAM role that allows it to access the S3 bucket with my packages.\r\n\r\nI'm frequently seeing a problem where 'pip install' reports a 400 HTTP error.  If I manually try to fetch the redirect error, I get back an Amazon error saying \"The provided token has expired.\"  This is with the default settings (expire_after=86400 seconds, buffer_time=600 seconds), and both the URL and the expiry data stored in SQLite suggest the URL should be valid for another 17 hours or so.\r\n\r\nI have a vague suspicion that the IAM role is introducing an unfortunate level of indirection, where the credentials boto comes up with actually expire after a relatively short period of time, but I haven't been able to prove this yet.\r\n\r\npypicloud==0.2.7 (with boto==2.34.0, if that's relevant) on Python 2.7.6 in an Ubuntu 14.04 Docker container on an Ubuntu 14.04 host."},"comment":{"url":"https://api.github.com/repos/mathcamp/pypicloud/issues/comments/73218472","html_url":"https://github.com/mathcamp/pypicloud/issues/38#issuecomment-73218472","issue_url":"https://api.github.com/repos/mathcamp/pypicloud/issues/38","id":73218472,"user":{"login":"pilbot","id":1645674,"avatar_url":"https://avatars.githubusercontent.com/u/1645674?v=3","gravatar_id":"","url":"https://api.github.com/users/pilbot","html_url":"https://github.com/pilbot","followers_url":"https://api.github.com/users/pilbot/followers","following_url":"https://api.github.com/users/pilbot/following{/other_user}","gists_url":"https://api.github.com/users/pilbot/gists{/gist_id}","starred_url":"https://api.github.com/users/pilbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pilbot/subscriptions","organizations_url":"https://api.github.com/users/pilbot/orgs","repos_url":"https://api.github.com/users/pilbot/repos","events_url":"https://api.github.com/users/pilbot/events{/privacy}","received_events_url":"https://api.github.com/users/pilbot/received_events","type":"User","site_admin":false},"created_at":"2015-02-06T10:44:08Z","updated_at":"2015-02-06T10:44:08Z","body":"@stevearc I am also seeing this issue, thanks for the fix. I'm now running your updated version and will report back with results."}}