Can I specify a default AWS configuration profile?
<p>In my development environment, I regularly switch between several AWS access keys. So in my <code>~/.aws/credentials</code> file, I have several profiles. I can then use these profiles with aws-cli by specifying the <code>--profile &lt;name&gt;</code> flag.</p>

<p>I develop several apps that use the Ruby AWS SDK. They are setup to read credentials from the <code>~/.aws/credentials</code> file (the SDK does this by default, see this <a href="http://docs.aws.amazon.com/sdk-for-ruby/latest/DeveloperGuide/aws-ruby-sdk-getting-started.html#aws-ruby-sdk-configuration" rel="noreferrer">configuration article</a>).</p>

<p>The problem is that the SDK always reads from the <code>default</code> profile. I would like to be able to configure it to read from some of the other profiles. Is this possible?</p>

<p>I've tried setting the default profile in my environment with:</p>

<pre><code>export AWS_DEFAULT_PROFILE=&lt;profile name&gt;
</code></pre>

<p>as outlined in <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-multiple-profiles" rel="noreferrer">configuring the AWS Command Line Interface</a> but it seems that only works with the aws-cli and not with the SDK.</p>