{"action":"closed","issue":{"url":"https://api.github.com/repos/aws/aws-cli/issues/1574","labels_url":"https://api.github.com/repos/aws/aws-cli/issues/1574/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-cli/issues/1574/comments","events_url":"https://api.github.com/repos/aws/aws-cli/issues/1574/events","html_url":"https://github.com/aws/aws-cli/issues/1574","id":112394383,"number":1574,"title":"ec2 import-image --dry-run incorrectly reports user's ability to perform ec2:ImportImage","user":{"login":"sysv","id":688411,"avatar_url":"https://avatars.githubusercontent.com/u/688411?v=3","gravatar_id":"","url":"https://api.github.com/users/sysv","html_url":"https://github.com/sysv","followers_url":"https://api.github.com/users/sysv/followers","following_url":"https://api.github.com/users/sysv/following{/other_user}","gists_url":"https://api.github.com/users/sysv/gists{/gist_id}","starred_url":"https://api.github.com/users/sysv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sysv/subscriptions","organizations_url":"https://api.github.com/users/sysv/orgs","repos_url":"https://api.github.com/users/sysv/repos","events_url":"https://api.github.com/users/sysv/events{/privacy}","received_events_url":"https://api.github.com/users/sysv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-20T15:28:00Z","updated_at":"2015-10-21T20:12:47Z","closed_at":"2015-10-21T20:12:47Z","body":"With this configuration: \r\n\r\n$ aws --version \r\naws-cli/1.8.12 Python/2.7.10 Darwin/15.0.0\r\n\r\nThe AWS-CLI is not reporting user permission as to whether the user can actually upload EC2 images (or not).  I get the following output, with an AWS account that does not have the ability to upload images. The command should report back, using sole arg --dry-run, and with no additional arguments, a simple check to see whether I am doing an 'UnauthorizedOperation', ....or not, w.r.t. being able to upload images. Here is how to reproduce:\r\n\r\nCase I: Perform a Dry-Run upload, w/o any other arg, to confirm permissions to upload. AWS-CLI incorrectly reports user has permissions to upload, which is not true. \r\n\r\n$ aws ec2 import-image --dry-run  \r\nA client error (DryRunOperation) occurred when calling the ImportImage operation: Request would have succeeded, but DryRun flag is set.\r\n\r\nCase II:  Attempt an upload with mostly a full set of args, without the -dry-run flag set, and then AWS-CLI  finally reports in stdio/stderr the lack of user-permissions to upload. \r\n\r\n$ aws ec2 import-image --description Windows_Server_2012 --license-type BYOL --architecture x86_64 --platform Windows  A client error (UnauthorizedOperation) occurred when calling the ImportImage operation: You are not authorized to perform this operation.\r\n\r\n"}}