1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-06 13:26:05 +02:00
tldr/pages/common/aws-s3-rm.md

25 lines
656 B
Markdown
Raw Normal View History

2022-10-21 09:08:20 -07:00
# aws s3 rm
> Delete S3 objects.
> More information: <https://awscli.amazonaws.com/v2/documentation/api/latest/reference/s3/rm.html>.
- Delete a specific S3 object:
`aws s3 rm s3://{{bucket_name}}/{{path/to/file}}`
- Preview the deletion of a specific S3 object without deleting it (dry-run):
`aws s3 rm s3://{{bucket_name}}/{{path/to/file}} --dryrun`
- Delete an object from a specific S3 access point:
`aws s3 rm s3://arn:aws:s3:{{region}}:{{account_id}}:{{access_point}}/{{access_point_name}}/{{object_key}}`
2024-11-08 12:56:58 +11:00
- Remove all objects from a bucket (empty the bucket):
`aws s3 rm s3://{{bucket_name}} --recursive`
2022-10-21 09:08:20 -07:00
- Display help:
`aws s3 rm help`