Module: RubyAemAws::S3Access
- Included in:
- Component::StackManagerResources
- Defined in:
- lib/ruby_aem_aws/client/s3.rb
Overview
Mixin for interaction with AWS S3
Instance Method Summary collapse
-
#get_s3_bucket(bucket) ⇒ Object
AWS S3 resource bucket connection.
-
#get_s3_bucket_object(bucket, s3_object_name) ⇒ Object
S3 object.
-
#get_s3_object(bucket, s3_object_name, dest_path) ⇒ Object
S3 object.
Instance Method Details
#get_s3_bucket(bucket) ⇒ Object
Returns AWS S3 resource bucket connection.
20 21 22 |
# 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) ⇒ Object
Returns S3 object.
27 28 29 30 |
# 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) ⇒ Object
Returns S3 object.
36 37 38 39 40 |
# File 'lib/ruby_aem_aws/client/s3.rb', line 36 def get_s3_object(bucket, s3_object_name, dest_path) = { bucket: bucket, key: s3_object_name } = .merge(response_target: dest_path) unless dest_path.nil? s3_client.get_object() end |