code: def validate_ec2_action(self):
          
          import_cmd = 'aws ec2 import-image --dry-run --profile {} --region {}'\
              .format(self.aws_project, self.aws_regions[0])
          print "Attempting ec2 import dry run: {}".format(import_cmd)
          try:
              subprocess.check_output(shlex.split(import_cmd), stderr=subprocess.STDOUT)
          except subprocess.CalledProcessError as e:
              if "(DryRunOperation)" in e.output:
                  # If it failed because of a dry run (what we asked for) then this except can be ignored
                  print "Dry run operation successful!"
                  return
              print "Error: {}".format(e.output)
              print "It doesn't seem like your user has the required permissions to import an ami image from s3"
              sys.exit(5)
docs: Attempt to validate that the provided user has permissions to import an AMI
          :return: