code: def __init__(self, config: AWSConfig):
      self.config = config
      if isinstance(config.creds, AWSAccessKeyCreds):
          self.session = boto3.Session(
              aws_access_key_id=config.creds.access_key,
              aws_secret_access_key=config.creds.secret_key,
          )
      else:  # default creds
          self.session = boto3.Session()
  
imports: from concurrent.futures import ThreadPoolExecutor, as_completed
  from typing import Dict, List, Optional
  import boto3
  import botocore.client
  import botocore.exceptions
  import dstack._internal.core.backends.aws.resources
  import dstack.version
  from dstack._internal import settings
  from dstack._internal.core.backends.aws.config import AWSConfig
  from dstack._internal.core.backends.base.compute import Compute, get_gateway_user_data, get_instance_name, get_user_data
  from dstack._internal.core.backends.base.offers import get_catalog_offers
  from dstack._internal.core.errors import NoCapacityError
  from dstack._internal.core.models.backends.aws import AWSAccessKeyCreds
  from dstack._internal.core.models.backends.base import BackendType
  from dstack._internal.core.models.instances import InstanceAvailability, InstanceOffer, InstanceOfferWithAvailability, InstanceState, LaunchedGatewayInfo, LaunchedInstanceInfo
  from dstack._internal.core.models.runs import Job, Requirements, Run
  from dstack._internal.utils.logging import get_logger
label_desc: Use image node_id 1 to create a new AWSCompute object from inherited base classes: Compute with example: obj = AWSCompute(config)