Class: ConfigureS3Website::S3Client

Inherits:
Object
  • Object
show all
Defined in:
lib/configure-s3-website/s3_client.rb

Class Method Summary collapse

Class Method Details

.configure_website(options) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/configure-s3-website/s3_client.rb', line 10

def self.configure_website(options)
  config_source = options[:config_source]
  begin
    enable_website_configuration(config_source)
    make_bucket_readable_to_everyone(config_source)
  rescue Aws::S3::Errors::NoSuchBucket
    create_bucket(config_source)
    retry
  end
end