{"action":"opened","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-php/issues/1664","repository_url":"https://api.github.com/repos/aws/aws-sdk-php","labels_url":"https://api.github.com/repos/aws/aws-sdk-php/issues/1664/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-php/issues/1664/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-php/issues/1664/events","html_url":"https://github.com/aws/aws-sdk-php/issues/1664","id":376747914,"node_id":"MDU6SXNzdWUzNzY3NDc5MTQ=","number":1664,"title":"InstanceProfileProvider does not handle when the response contains an invalid JSON","user":{"login":"alquerci","id":2987860,"node_id":"MDQ6VXNlcjI5ODc4NjA=","avatar_url":"https://avatars3.githubusercontent.com/u/2987860?v=4","gravatar_id":"","url":"https://api.github.com/users/alquerci","html_url":"https://github.com/alquerci","followers_url":"https://api.github.com/users/alquerci/followers","following_url":"https://api.github.com/users/alquerci/following{/other_user}","gists_url":"https://api.github.com/users/alquerci/gists{/gist_id}","starred_url":"https://api.github.com/users/alquerci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alquerci/subscriptions","organizations_url":"https://api.github.com/users/alquerci/orgs","repos_url":"https://api.github.com/users/alquerci/repos","events_url":"https://api.github.com/users/alquerci/events{/privacy}","received_events_url":"https://api.github.com/users/alquerci/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-02T10:13:02Z","updated_at":"2018-11-02T10:13:02Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nWe have a dynamically modified infrastructure managed by auto-scaling rules. EC2 instances are launched and terminated upon load.\r\n\r\nIssue\r\n------\r\n\r\nSome times the instance metadata server respond with an invalid JSON and we got this exception.\r\n\r\nThe response body here is partial.\r\n\r\n```\r\nUnexpected instance profile response code:  \r\nStack trace:\r\n#0 /var/www/html/starofservice/fr/vendor/aws/aws-sdk-php/src/Credentials/InstanceProfileProvider.php(53): Aws\\Credentials\\InstanceProfileProvider->decodeResult('{\\n  \"Code\" : \"S...')\r\n```\r\n\r\nSee https://github.com/aws/aws-sdk-php/blob/3.70.2/src/Credentials/InstanceProfileProvider.php#L102\r\n\r\nNote\r\n-------\r\n\r\n* When occurred the common retry behaviour is skipped.\r\n* I saw boto provides a fix for such issue https://github.com/boto/botocore/issues/1049\r\n"}}
{"actor":{"display_login":"alquerci"}}