Skip to contents

List objects in an S3 bucket

Usage

aws_bucket_list_objects(bucket, ...)

Arguments

bucket

(character) bucket name. required

...

named parameters passed on to list_objects

Value

if no objects found, an empty tibble. if tibble has rows each is an S3 bucket, with 8 columns:

  • bucket_name (character)

  • key (character)

  • uri (character)

  • size (fs::bytes)

  • type (character)

  • owner (character)

  • etag (character)

  • last_modified (dttm)

Examples

if (FALSE) { # interactive()
bucket_name <- random_string("bucket")
if (!aws_bucket_exists(bucket_name)) aws_bucket_create(bucket_name)
links_file <- file.path(system.file(), "Meta/links.rds")
aws_file_upload(
  links_file,
  s3_path(bucket_name, basename(links_file))
)
aws_bucket_list_objects(bucket = bucket_name)
}