My guess is that the 'test' is not set/properly in your configuration file.
As an added bonus, when loading your configuration files from config/*.yml, Rails provides a helper method to fetch the configurations.
Assuming you've nested your configurations appropriately, you should be able to #{your app name here(find it in config/application.rb)}::Application.config_for(:aws)
, if you've set it properly, you should just be able to fetch the values, without looking under the environment.
Take a look at this for example
production:
secret_key: 000894jnjfbdfu39
secret_id: 123456
bucket: shadow
development:
secret_key: 000894jnjfbdfu39
secret_id: 123456
bucket: shadow
test:
secret_key: 000894jnjfbdfu39
secret_id: 123456
bucket: meadow
In your application initializer, you could then have:
AWS_CONFIG = YourApp::Application.config_for(:aws)
All other things should work normally after this.