module RubyAemAws::S3Access
Mixin for interaction with AWS S3
Public Instance Methods
get_s3_bucket(bucket)
click to toggle source
@param bucket AWS S3 bucket name @return AWS S3 resource bucket connection
# File lib/ruby_aem_aws/client/s3.rb, line 20 def get_s3_bucket(bucket) s3_resource.bucket(bucket) end
get_s3_bucket_object(bucket, s3_object_name)
click to toggle source
@param bucket AWS S3 bucket name @param s3_object_name AWS S3 object name @return S3 object
# File lib/ruby_aem_aws/client/s3.rb, line 27 def get_s3_bucket_object(bucket, s3_object_name) bucket = get_s3_bucket(bucket) bucket.object(s3_object_name) end
get_s3_object(bucket, s3_object_name, dest_path)
click to toggle source
@param bucket AWS S3 bucket name @param s3_object_name AWS S3 object name @param dest_path Download destionation path @return S3 object
# File lib/ruby_aem_aws/client/s3.rb, line 36 def get_s3_object(bucket, s3_object_name, dest_path) options = { bucket: bucket, key: s3_object_name } options = options.merge(response_target: dest_path) unless dest_path.nil? s3_client.get_object(options) end