Error `The config profile (default) could not be found` when configuring AWS CLI

As of August 17th 21:29 UTC, some CircleCI users may see their builds failing when using CircleCI AWS CLI orb to install and configure a AWS profile.

Specifically, you may see the following error:

The config profile (default) could not be found

This is due to a bug introduced in AWS CLI v1.25.54, as noted on the GitHub issue on AWS CLI:

This has since been fixed as of AWS CLI v1.25.55.

Why are my builds affected?

In general, this bug is particular to AWS CLI v1.24.54.
If you are installing AWS CLI 2.x, your builds should not be affected.

For customers affected by thus, you are likely using an older version of CircleCI AWS CLI Orb (version 1.4.1 and below).

You can also verify this, by SSH-ing into the failed build, and run aws --version to confirm the installed AWS CLI version.

How to resolve then?

  1. When using the latest CircleCI AWS CLI Orb (v3.11 as of this writing), AWS CLI 2.x is installed.
    As such, please try upgrading the AWS CLI orb to the latest version if possible:
    CircleCI Developer Hub - circleci/aws-cli

  2. Otherwise, please try to re-run the failed build.
    The AWS CLI Orb will install the latest CLI version everytime, whether v1.x or v2.x.
    The re-run build should install the patched v1.25.55 (if version 1.x), and that should resolve now.

Here is a sample job where I have confirmed v1.25.55 is installed and the AWS profile is configured successfully: