Skip to contents

Delete an S3 bucket

Usage

aws_bucket_delete(bucket, force = FALSE, ...)

Arguments

bucket

(character) bucket name. required

force

(logical) force deletion without going through the prompt. default: FALSE. Should only be set to TRUE when required for non-interactive use.

...

named parameters passed on to delete_bucket

Value

NULL, invisibly

Note

Requires the env var AWS_REGION. This function prompts you to make sure that you want to delete the bucket.

Examples

if (FALSE) { # interactive()
bucket_name <- "bucket-to-delete-113"
if (!aws_bucket_exists(bucket_name)) {
  aws_bucket_create(bucket = bucket_name)
  aws_buckets()
  aws_bucket_delete(bucket = bucket_name)
  aws_buckets()
}
}