Delete S3 Object
s3_delete_objectDelete unwanted or obsolete objects from Amazon S3 buckets, clean up temporary uploads, and remove specific versions from versioned buckets.
Instructions
Delete an object from an S3 bucket.
⚠️ WARNING: This is a DESTRUCTIVE operation. Deleted objects cannot be recovered unless versioning is enabled on the bucket.
Use this tool to:
Remove unwanted or obsolete files
Clean up temporary uploads
Delete specific versions in versioned buckets
Args: bucket_name: S3 bucket name key: Object key to delete (e.g., 'temp/old-file.txt') version_id: Specific version to delete (for versioned buckets only) response_format: Output format - 'markdown' (default) or 'json'
Returns: Deletion confirmation with version information if applicable. For versioned buckets, indicates if a delete marker was created.
Behavior: - Non-versioned buckets: Object is permanently deleted - Versioned buckets: Delete marker created (object can be recovered) - With version_id: Specific version permanently deleted
Security Notes: - Requires s3:DeleteObject IAM permission - For versioned buckets, may need s3:DeleteObjectVersion - Consider enabling MFA Delete for added protection - Operation cannot be undone for non-versioned buckets
Error Handling: - Bucket/object not found: Returns error (idempotent - safe to retry) - Access denied: Returns error with IAM permission guidance - Invalid parameters: Returns validation error with corrections
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"bucket_name": "<bucket_name>",
"key": "<key>"
},
"name": "s3_delete_object"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| version_id | No | ||
| bucket_name | Yes | ||
| response_format | No | markdown |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |