def get_url_for_key(key):
    """Returns a url for a given key object"""
    return "https://s3.amazonaws.com/{bucket_name}/{key_path}".format(
        bucket_name=key.bucket.name,
        key_path=key.key
    )