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 foundBefore 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_PROFILEpoints 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/configa 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 looks —
AWS_CONFIG_FILE/AWS_SHARED_CREDENTIALS_FILEoverriding the path, a different home directory under sudo/a service user, or a container without the~/.awsmount.
How to fix it
List what's actually visible to your environment:
aws configure list-profiles env | grep -i '^AWS_'Fix or unset the pointer —
unset AWS_PROFILE(or set it to a listed profile), correct the--profile/profile_namespelling.Check the section headers:
# ~/.aws/config [profile myprofile] region = eu-west-1 # ~/.aws/credentials [myprofile] aws_access_key_id = ... aws_secret_access_key = ...Create the profile if it never existed —
aws configure --profile myprofile(oraws configure ssofor Identity Center profiles).In containers/CI, prefer environment credentials or a role over profile files — or mount/point
AWS_CONFIG_FILEat 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.
Related errors
- Unable to locate credentials — no credentials found at all (no explicit profile involved).
- Could not load credentials from any providers — the JS-SDK flavor of the same chain failure.
- SSO session expired — the profile exists but its SSO login lapsed.
- Learn: DynamoDB Local & LocalStack setup
References
- Configuration and credential file settings in the AWS CLI — AWS CLI User Guide
- Configuring environment variables for the AWS CLI — AWS CLI User Guide (AWS_PROFILE, AWS_CONFIG_FILE, AWS_SHARED_CREDENTIALS_FILE)
- Configuring IAM Identity Center authentication with the AWS CLI — AWS CLI User Guide (aws configure sso)
Last verified 2026-07-13 against the official AWS documentation linked above.