Module: Lono::Template::AwsService

Included in:
Upload
Defined in:
lib/lono/template/aws_service.rb

Instance Method Summary collapse

Instance Method Details

#s3Object



4
5
6
7
8
9
10
11
# File 'lib/lono/template/aws_service.rb', line 4

def s3
  return @s3 if @s3

  options = {}
  # example: endpoint: 'https://s3.us-west-2.amazonaws.com'
  options[:endpoint] = ENV['S3_ENDPOINT'] if ENV['S3_ENDPOINT']
  @s3 = Aws::S3::Client.new(options)
end