import re


def is_aws_ecr(container_location):
    """
    return `True` if the container looks like it is stored in an AWS repository.
    """
    look = re.match(r'^https?://(.*)', container_location)
    if look:
        container_location_no_scheme = look.group(1)
    else:
        container_location_no_scheme = container_location
    return bool(re.match(
            r'^[0-9]+\.dkr\.ecr\.[a-z0-9\-]+\.amazonaws\.com\/.*',
            container_location_no_scheme))