{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-go/issues/599","repository_url":"https://api.github.com/repos/aws/aws-sdk-go","labels_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/599/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/599/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/599/events","html_url":"https://github.com/aws/aws-sdk-go/issues/599","id":141953553,"number":599,"title":"Instance nonexistence is improperly handled in ec2.WaitUntilInstance*","user":{"login":"flawedmatrix","id":1447709,"avatar_url":"https://avatars.githubusercontent.com/u/1447709?v=3","gravatar_id":"","url":"https://api.github.com/users/flawedmatrix","html_url":"https://github.com/flawedmatrix","followers_url":"https://api.github.com/users/flawedmatrix/followers","following_url":"https://api.github.com/users/flawedmatrix/following{/other_user}","gists_url":"https://api.github.com/users/flawedmatrix/gists{/gist_id}","starred_url":"https://api.github.com/users/flawedmatrix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flawedmatrix/subscriptions","organizations_url":"https://api.github.com/users/flawedmatrix/orgs","repos_url":"https://api.github.com/users/flawedmatrix/repos","events_url":"https://api.github.com/users/flawedmatrix/events{/privacy}","received_events_url":"https://api.github.com/users/flawedmatrix/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-sdk-go/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/aws/aws-sdk-go/labels/Service%20API","name":"Service API","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"jasdel","id":961963,"avatar_url":"https://avatars.githubusercontent.com/u/961963?v=3","gravatar_id":"","url":"https://api.github.com/users/jasdel","html_url":"https://github.com/jasdel","followers_url":"https://api.github.com/users/jasdel/followers","following_url":"https://api.github.com/users/jasdel/following{/other_user}","gists_url":"https://api.github.com/users/jasdel/gists{/gist_id}","starred_url":"https://api.github.com/users/jasdel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasdel/subscriptions","organizations_url":"https://api.github.com/users/jasdel/orgs","repos_url":"https://api.github.com/users/jasdel/repos","events_url":"https://api.github.com/users/jasdel/events{/privacy}","received_events_url":"https://api.github.com/users/jasdel/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-03-18T19:10:00Z","updated_at":"2016-03-19T00:58:21Z","closed_at":null,"body":"When an instance does not exist EC2 seems to return (as of 18 March 2016)\r\n```go\r\n      <*awserr.requestError | 0xXXXXXXXXXX>: {\r\n          awsError: {\r\n              code: \"InvalidInstanceID.NotFound\",\r\n              message: \"The instance ID '<instance-id>' does not exist\",\r\n              errs: nil,\r\n          },\r\n          statusCode: 400,\r\n          requestID: \"\",\r\n      }\r\n```\r\n\r\nwhereas the retry case for the Instance waiters [in the current version of the SDK](https://github.com/aws/aws-sdk-go/blob/4da0bec8953a0a540f391930a946917b12a95671/service/ec2/waiters.go) has a retry condition of \r\n```go\r\n{\r\n\tState:    \"retry\",\r\n\tMatcher:  \"error\",\r\n\tArgument: \"\",\r\n\tExpected: \"InvalidInstanceIDNotFound\",\r\n }\r\n```\r\n\r\nso that [when we get to the error message comparison](https://github.com/aws/aws-sdk-go/blob/4da0bec8953a0a540f391930a946917b12a95671/private/waiter/waiter.go#L82) it fails. This problem also seems to affect the waiters in the Python SDK as well.\r\n\r\n@flawedmatrix @calebamiles\r\nPivotal Software"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-go/issues/comments/198596038","html_url":"https://github.com/aws/aws-sdk-go/issues/599#issuecomment-198596038","issue_url":"https://api.github.com/repos/aws/aws-sdk-go/issues/599","id":198596038,"user":{"login":"calebamiles","id":848394,"avatar_url":"https://avatars.githubusercontent.com/u/848394?v=3","gravatar_id":"","url":"https://api.github.com/users/calebamiles","html_url":"https://github.com/calebamiles","followers_url":"https://api.github.com/users/calebamiles/followers","following_url":"https://api.github.com/users/calebamiles/following{/other_user}","gists_url":"https://api.github.com/users/calebamiles/gists{/gist_id}","starred_url":"https://api.github.com/users/calebamiles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calebamiles/subscriptions","organizations_url":"https://api.github.com/users/calebamiles/orgs","repos_url":"https://api.github.com/users/calebamiles/repos","events_url":"https://api.github.com/users/calebamiles/events{/privacy}","received_events_url":"https://api.github.com/users/calebamiles/received_events","type":"User","site_admin":false},"created_at":"2016-03-19T00:58:21Z","updated_at":"2016-03-19T00:58:21Z","body":"Thanks for the information @jasdel. Thankfully the waiter was used only in test so we [can safely retry](https://github.com/cloudfoundry-incubator/aws-light-stemcell-builder/blob/c306dd53ade860d006df14d7a8ce447335d638ff/src/light-stemcell-builder/driver/create_ami_driver_test.go#L87) and thankfully we're not too prideful to do so."}}