docs: def ssh(ctx, instance_id, instance_name, username, key_file, port, ssh_options, private_ip,
          gateway_instance_id, gateway_username, dry_run):
      """SSH to EC2 instance"""
      session = create_session(ctx.obj['AWS_PROFILE_NAME'])
  
      if instance_id is None and instance_name is None:
          click.echo(
              "One of --instance-id/-i or --instance-name/-n"
              " has to be specified.", err=True)
          sys.exit(1)
      elif instance_id is not None and instance_name is not None:
          click.echo(
              "Both --instance-id/-i and --instance-name/-n "
              "can't to be specified at the same time.", err=True)
          sys.exit(1)
      cmd = create_ssh_command(
          session, instance_id, instance_name, username, key_file, port, ssh_options, private_ip,
          gateway_instance_id, gateway_username)
      if not dry_run:
          subprocess.call(cmd, shell=True)
      else:
          click.echo(cmd)