from typing import List
from typing import Tuple


def region_matches_partition(region: str, partition: str) -> bool:
    """
    Returns True if the provided region and partition are a valid pair.

    :param region: AWS region code to test.
    :type: region: str
    :param partition: AWS partition code to test.
    :type partition: str
    :return: Returns True if the provided region and partition are a valid pair.
    :rtype: bool
    """
    valid_matches: List[Tuple[str, str]] = [
        ("cn-", "aws-cn"),
        ("us-gov-", "aws-us-gov"),
        ("us-gov-iso-", "aws-iso"),
        ("us-gov-iso-b-", "aws-iso-b"),
    ]

    for prefix, expected_partition in valid_matches:
        if region.startswith(prefix):
            return partition == expected_partition
    return partition == "aws"