The config profile could not be found
TL;DR — Der Profilname, den du verwendest, existiert nicht in den AWS-Konfigurationsdateien, die dein Prozess liest. Drei übliche Verdächtige: eine veraltete Umgebungsvariable AWS_PROFILE, ein Tippfehler in --profile/profile_name oder ein Profil unter der falschen Abschnittsüberschrift — ~/.aws/config braucht [profile myprofile], während ~/.aws/credentials schlicht [myprofile] verwendet. Führe aws configure list-profiles aus und vergleiche.
Was es bedeutet
botocore.exceptions.ProfileNotFound: The config profile (myprofile) could not be foundBevor ein DynamoDB-Aufruf signiert werden kann, löst das SDK ein Credentials-Profil auf. Wenn ein Profil explizit angefordert wurde — über AWS_PROFILE, --profile oder boto3.Session(profile_name=...) — und kein Abschnitt mit diesem Namen in den gelesenen Konfigurations-/Credentials-Dateien existiert, stoppt die Auflösung mit diesem Fehler. Nichts hat AWS erreicht; es ist rein ein lokal fehlschlagender Konfigurations-Lookup.
Warum es passiert
AWS_PROFILEzeigt auf ein Profil, das nicht existiert — vor langer Zeit in einer Shell-rc-Datei, einem Container-Image oder in der CI-Konfiguration gesetzt, dann wurde das Profil umbenannt oder entfernt.- Ein Tippfehler oder eine Groß-/Kleinschreibungs-Abweichung — Profilnamen werden exakt abgeglichen.
- Falsche Abschnitts-Header-Syntax — in
~/.aws/configmuss ein benanntes Profil als[profile myprofile]deklariert werden; schreibst du dort[myprofile], kann die CLI/das SDK es nicht finden (die schlichte Form gehört in~/.aws/credentials). - Die Dateien liegen nicht dort, wo der Prozess sucht —
AWS_CONFIG_FILE/AWS_SHARED_CREDENTIALS_FILEüberschreiben den Pfad, ein anderes Home-Verzeichnis unter sudo/einem Service-User oder ein Container ohne den~/.aws-Mount.
So behebst du es
Liste auf, was für deine Umgebung tatsächlich sichtbar ist:
aws configure list-profiles env | grep -i '^AWS_'Korrigiere oder entferne den Zeiger —
unset AWS_PROFILE(oder setze es auf ein gelistetes Profil), korrigiere die Schreibweise von--profile/profile_name.Prüfe die Abschnitts-Header:
# ~/.aws/config [profile myprofile] region = eu-west-1 # ~/.aws/credentials [myprofile] aws_access_key_id = ... aws_secret_access_key = ...Lege das Profil an, falls es nie existierte —
aws configure --profile myprofile(oderaws configure ssofür Identity-Center-Profile).In Containern/CI bevorzuge Umgebungs-Credentials oder eine Rolle statt Profildateien — oder mounte/verweise
AWS_CONFIG_FILEauf eine Datei, die das Profil wirklich definiert.
Sobald das Profil aufgelöst wird, prüfe, ob es deine Tabellen tatsächlich erreichen kann — DynoTable nutzt deine AWS-Profile zum Verbinden, und sein Profil-Umschalter macht sichtbar, „welches Profil welche Tabellen sieht".
In DynoTable ansehen
DynoTable liest dieselben ~/.aws/credentials and ~/.aws/config Dateien auf as the CLI — add proDateien auf under Einstellungen → Profile, wähle den Profilnamen aus dem Dropdown, and run Verbindung testen um zu bestätigen, dass es auflöst, bevor dein SDK es tut. Profilwechsel (⌘P) makes a stale AWS_PROFILE obvious when tables disappear.
Für Local, create a profile with endpoint http://localhost:8000 and dummy credentials. Siehe Mit AWS verbinden und Installation. Öffne Tabellen mit ⌘K once connected, then run a smoke-test query in the Query Builder.
Quellen
- [Configuration and credential file settings in the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-Dateien auf.html) (verifiziert 2026-07-13)
- Configuring environment variables for the AWS CLI (verifiziert 2026-07-13)
So reproduzierst du es
Zeige boto3 auf a profile that is not in your config, with the AWS environment cleared so nothing else satisfies the lookup:
import boto3
boto3.Session(profile_name='no-such-profile-xyz').client('dynamodb').list_tables()Echte Ausgabe:
ProfileNotFound: The config profile (no-such-profile-xyz) could not be foundDas wirft botocore auf dem Client, before any request reaches AWS — which is why there is no HTTP status and why retrying cannot help. The name in parentheses is the profile it looked for, so it tells you whether the typo is in your code or in your config file.
Verwandte Fehler
- Unable to locate credentials — überhaupt keine Credentials gefunden (kein explizites Profil beteiligt).
- Could not load credentials from any providers — die JS-SDK-Variante desselben Chain-Fehlers.
- SSO session expired — das Profil existiert, aber sein SSO-Login ist abgelaufen.
- Learn: DynamoDB Local & LocalStack einrichten
Referenzen
- 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)
Zuletzt verifiziert am 2026-07-13 gegen die oben verlinkte offizielle AWS-Dokumentation.
Am 2026-07-26 gegen boto3 1.43.56 / botocore 1.43.56 reproduziert — die Ausgabe oben ist wortgetreu.