def _validate_custom_flags()

in ec2instanceconnectcli/input_parser.py [0:0]


def _validate_custom_flags(flags):
    if len(flags) < 1:
        raise AssertionError('Missing target')
    for flag in flags:
        flag = flag.strip()
        if flag == '-i':
            raise AssertionError(
                "'-i' is not supported when using mssh. When using the mssh command to connect to your instance, you "
                "do not need to specify any kind of identity file, because EC2 Instance Connect manages the key pair. "
                "Remove the -i flag from 'mssh <instance-id>' (or 'mssh <user>@<instance-id>' for an Ubuntu instance) "
                "and try again."
            )