You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::Plugins::GlobalConfiguration

Seahorse::Client::Plugin show all
Defined in:


This plugin provides the ability to provide global configuration for all AWS classes or specific ones.

Global AWS configuration

You can specify global configuration defaults via Aws.config

Aws.config[:region] = 'us-west-2'

Options applied to Aws.config are merged with constructed service interfaces.

# uses the global configuration #=> 'us-west-2'

# constructor args have priority over global configuration 'us-east-1').config.region #=> 'us-east-1'

Service Specific Global Configuration

Some services have very specific configuration options that are not shared by other services.

# oops, this option is only recognized by Aws::S3
Aws.config[:force_path_style] = true
#=> raises ArgumentError: invalid configuration option `:force_path_style'

To avoid this issue, you can nest service specific options

Aws.config[:s3] = { force_path_style: true } # no error this time #=> true

Method Summary

Methods inherited from Seahorse::Client::Plugin

#add_handlers, #add_options, #after_initialize, after_initialize, before_initialize, option

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response