How to see what profile is default with CLI?
<p>Given I have the following config file:</p>

<pre><code>[default]
aws_access_key_id=default_access_key
aws_secret_access_key=default_secret_key

[profile testing]
aws_access_key_id=testing_access_key
aws_secret_access_key=testing_secret_key
region=us-west-2
</code></pre>

<p>And given the name of my default profile is <code>foo</code></p>

<p>What CLI commands do I need to type in to get the name of my default profile. Something like:</p>

<pre><code>$ aws describe-default-profile

{
    ...
    "default_profile_name": 'foo'
}
</code></pre>

<p>Or list all profiles and it ouputs the default too:</p>

<pre><code>$ aws list-all-profiles

{
    [{
        ...
        profile_name: 'foo',
        "is_default": true
    }]
}
</code></pre>

<p>There is a <code>get-instance-profile</code> on <code>iam</code> (<a href="http://docs.aws.amazon.com/cli/latest/reference/iam/get-instance-profile.html" rel="noreferrer">docs</a>), but it requires the name of the profile be specified:</p>

<pre><code>$ aws iam get-instance-profile --instance-profile-name ExampleInstanceProfile
</code></pre>