Resolve AWS file delete issue