def set_acl(**kwargs):
    """Set ACL of object or object."""
    resource = kwargs.get('resource')
    bucket_name = kwargs.get('bucket_name')
    object_name = kwargs.get('object_name')
    if kwargs.get('acl_type') == 'object':
        obj = resource.Object(bucket_name=bucket_name, key=object_name)
    if kwargs.get('acl_type') == 'bucket':
        obj = resource.Bucket(bucket_name)
    response = obj.Acl().put(ACL=kwargs.get('acl'))
    return response
