The config profile could not be found

TL;DR — The profile name you're using doesn't exist in the AWS config files your process is reading. Three usual suspects: a stale AWS_PROFILE environment variable, a typo in --profile/profile_name, or the profile defined under the wrong section header — the ~/.aws/config file needs [profile myprofile], while ~/.aws/credentials uses plain [myprofile]. Run aws configure list-profiles and compare.

What it means

botocore.exceptions.ProfileNotFound: The config profile (myprofile) could not be found

Before any DynamoDB call can be signed, the SDK resolves a credentials profile. If a profile was explicitly requested — via AWS_PROFILE, --profile, or boto3.Session(profile_name=...) — and no section with that name exists in the config/credentials files being read, resolution stops with this error. Nothing reached AWS; it's entirely a local configuration lookup failing.

Why it happens

  • AWS_PROFILE points at a profile that doesn't exist — set in a shell rc file, a container image, or CI config long ago, then the profile was renamed or removed.
  • A typo or case mismatch — profile names are matched exactly.
  • Wrong section-header syntax — in ~/.aws/config a named profile must be declared as [profile myprofile]; writing [myprofile] there means the CLI/SDK can't find it (the plain form belongs in ~/.aws/credentials).
  • The files aren't where the process looksAWS_CONFIG_FILE/AWS_SHARED_CREDENTIALS_FILE overriding the path, a different home directory under sudo/a service user, or a container without the ~/.aws mount.

How to fix it

  1. List what's actually visible to your environment:

    aws configure list-profiles
    env | grep -i '^AWS_'
  2. Fix or unset the pointerunset AWS_PROFILE (or set it to a listed profile), correct the --profile/profile_name spelling.

  3. Check the section headers:

    # ~/.aws/config
    [profile myprofile]
    region = eu-west-1
    
    # ~/.aws/credentials
    [myprofile]
    aws_access_key_id = ...
    aws_secret_access_key = ...
  4. Create the profile if it never existedaws configure --profile myprofile (or aws configure sso for Identity Center profiles).

  5. In containers/CI, prefer environment credentials or a role over profile files — or mount/point AWS_CONFIG_FILE at a file that really defines the profile.

Once the profile resolves, verify it can actually reach your tables — the DynoTable desktop app uses your AWS profiles to connect and makes "which profile sees which tables" visible, and the DynamoDB pricing calculator helps plan what that account's workload costs.

References

Last verified 2026-07-13 against the official AWS documentation linked above.

Work with DynamoDB without the Console

DynoTable is a fast desktop client for DynamoDB — browse tables, run SQL-style queries, and edit items locally.