docstr: :param instance: string formatted according to :code:`.SSHResourceManager.parse_hostname`
  :type instance: str
docstr_tok: [":","param","instance",":","string","formatted","according","to",":","code",":","`",".SSHResourceManager.parse_hostname","`",":","type","instance",":","str"]
code: def __init__(self, instance):
      """
  
      :param instance: string formatted according to :code:`.SSHResourceManager.parse_hostname`
      :type instance: str
      """
      super(AWSRemote, self).__init__(instance)
  
      if not _is_instance_id(self.hostname):  # use SSHResourceManager
          logger.debug(
              "AWS connection profile %s %s",
              self.username,
              self.hostname,
          )
          return
  
      instance = self.verify(self.hostname)
      if instance.state["Name"] == "running":
          logger.debug("Instance is already running")
          self.hostname = instance.public_dns_name
          logger.debug("New Hostname= %s", str(self.hostname))
      else:
          logger.debug("Instance was not running, Starting instance")
          self.change_status([self.hostname])
          instance = self.ec2_resource.Instance(self.hostname)
          try:
              instance.wait_until_running()
          except Exception as e:
              logger.fatal("Catch unexpected problem with AWS instance")
              raise e
          self.hostname = instance.public_dns_name
          while instance.state["Name"] != "running":
              logger.warning(
                  "waiting instance %s to start, wait 10 sec",
                  instance.state["Name"],
              )
              time.sleep(10)
              instance.load()  # additional waiting time for SSH service ready
          logger.debug("...instance is %s", instance.state["Name"])
      logger.debug(
          "AWS connection profile %s %s", self.username, self.hostname
      )
  
file_path: auptimizer/src/aup/EE/Resource/AWSResourceManager.py
imports: import logging
  import time
  import boto3
  import paramiko
  from botocore.exceptions import ClientError
  from .SSHResourceManager import SSHResourceManager, Remote, parse_hostname
label_desc: Use image node_id 3 to create a new AWSRemote object from inherited base classes: Remote with example: obj = AWSRemote(instance)