Module: MovableInk::AWS::S3

Included in:
MovableInk::AWS
Defined in:
lib/movable_ink/aws/s3.rb

Instance Method Summary collapse

Instance Method Details

#directory_exists?(bucket:, prefix:) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/movable_ink/aws/s3.rb', line 10

def directory_exists?(bucket:, prefix:)
  !run_with_backoff { s3.list_objects_v2(bucket: bucket, prefix: prefix, max_keys: 1).contents.empty? }
end

#s3Object



6
7
8
# File 'lib/movable_ink/aws/s3.rb', line 6

def s3
  @s3_client ||= Aws::S3::Client.new(region: 'us-east-1')
end