# Delete artifact in s3

**URL:** <https://community.wandb.ai/t/delete-artifact-in-s3/1228>\
**Category:** W&B Help\
**Tags:** artifacts, wandb\
**Created:** [November 4, 2021, 8:04pm UTC](https://community.wandb.ai/t/delete-artifact-in-s3/1228 "2021-11-04T20:04:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ierezell](https://avatars.discourse-cdn.com/v4/letter/i/7cd45c/32.png) [@ierezell](https://community.wandb.ai/u/ierezell)\
**Post date:** [November 4, 2021, 8:04pm UTC](https://community.wandb.ai/t/delete-artifact-in-s3/1228/1 "2021-11-04T20:04:44Z")

</div>

Hi 🙂

I was wondering if it’s possible to delete an artifact that is a reference to an S3 object.  
I mean deleting it within weight and biases but also from S3.

If it’s not built-in, is there any webhook that I can use to delete my model in S3 when deleting it from W&B?

The flow would be :

1. Train =\> Push metrics to W&B, push model to S3, add the S3 reference of the model as an artifact in W&B.
2. Evaluate, do some comparison, ML magic, etc…
3. Deciding to delete the run as another was better. Delete in W&B, which will remove all the run and all the files in S3 associated with this run.

Thanks in advance for any help.

Have a great day 🙂

---

<div class="post-metadata">

**Author:** ![ramit\_goolry](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@ramit\_goolry](https://community.wandb.ai/u/ramit_goolry)\
**Post date:** [November 5, 2021, 9:54pm UTC](https://community.wandb.ai/t/delete-artifact-in-s3/1228/2 "2021-11-05T21:54:49Z")

</div>

Hi @ierezell,

This is not supported inside of wandb. You can use [Boto3’s S3](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3.html) API to delete objects from S3.

W&B does not store the data from any artifact references, only metadata related to the artifacts. As a result, we can not operate on that data.

Thanks,  
Ramit

---

<div class="post-metadata">

**Author:** ![ierezell](https://avatars.discourse-cdn.com/v4/letter/i/7cd45c/32.png) [@ierezell](https://community.wandb.ai/u/ierezell)\
**Post date:** [November 5, 2021, 10:25pm UTC](https://community.wandb.ai/t/delete-artifact-in-s3/1228/3 "2021-11-05T22:25:45Z")

</div>

Hi @ramit_goolry,

Thanks for the clarification 🙂

Is there any possibility to have a webhook then?  
So when a delete is called wandb executes my hook to delete the corresponding S3 files ?

Thanks in advance,  
have a great day

---

<div class="post-metadata">

**Author:** ![ramit\_goolry](https://avatars.discourse-cdn.com/v4/letter/r/85e7bf/32.png) [@ramit\_goolry](https://community.wandb.ai/u/ramit_goolry)\
**Post date:** [November 8, 2021, 8:42pm UTC](https://community.wandb.ai/t/delete-artifact-in-s3/1228/4 "2021-11-08T20:42:31Z")

</div>

Hi @ierezell,

I apologize, but we don’t support web hooks to S3 currently. The most secure way to programmatically delete your artifacts would be through Amazon’s Boto3 API.

Thanks,  
Ramit

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/wandb/original/1X/366b649231631dbab896843020da0056074ac79d.png) [@system](https://community.wandb.ai/u/system)\
**Post date:** [January 7, 2022, 8:42pm UTC](https://community.wandb.ai/t/delete-artifact-in-s3/1228/5 "2022-01-07T20:42:42Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
