moj-analytical-services / s3tools

Interact with files in s3 on the Analytical Platform
8 stars 2 forks source link

Laggy 'accessible_buckets()' #14

Closed RobinL closed 6 years ago

RobinL commented 7 years ago

this takes ages to run - why?

RobinL commented 7 years ago

This is something to do with the refreshable creds:

  credentials <- suppressMessages(get_credentials())

  check_access <- function(bucket_name){
      suppressMessages(refresh(credentials))
      suppressMessages(aws.s3::bucket_exists(bucket_name))[1]
  }

  suppressMessages(refresh(credentials))

is where the lag is