oss有专门的生命周期的管理,你可以在控制台设置对应的规则,具体案例可以看官方文档https://help.aliyun.com/document_detail/31863.html?spm=a2c4g.31904.0.i0