#10698·aws-cli

在设置全局 `endpoint_url` 或 `AWS_ENDPOINT_URL` 时,`AWS configure agent-toolkit` 失败

作者: HarshCasper创建于 2026年9月28日更新于 2026年9月28日

Describe the bug When a global endpoint is configured, AWS configure agent-toolkit sends its Agent Toolkit requests there. The global endpoint can be AWS_ENDPOINT_URL or endpoint_url at profile level. People set one for other services: a local AWS emulator for tests, an S3-compatible object store, or a single-host proxy. That endpoint cannot serve GET /api/skills. The wizard stops after "Fetching default AWS skills…" and exits before it installs skills or writes any MCP config. The same failure hits: - add-skill, update-skill, check-skill-updates and get-skill-file - the wizard launched from the prompt after AWS configure, AWS configure sso and AWS login The client already avoids settings meant for other services in two places: - create_client uses us-east-1 unless --region is passed, because the API is served from one region (utils.py#L68-L78). - The prompt clears --endpoint-url because it "is aimed at the calling command" (hint.py#L152-L155). A configured global endpoint is the case neither one covers. ### Expected Behavior With a global endpoint configured, the wizard and the skill commands still reach https://agent-toolkit.us-east-1.api.AWS, as they do without one. Settings aimed at this service still apply: --endpoint-url, AWS_ENDPOINT_URL_AGENTTOOLKIT, and agenttoolkit in a services section. ### Current Behavior $ AWS_ENDPOINT_URL=http://127.0.0.1:9 AWS configure agent-toolkit --yes ... Fetching default AWS skills... AWS: [ERROR]: Could not connect to the endpoint URL: "http://127.0.0.1:9/api/skills?category_filter=AWS-core" It exits with code 255, installs no skills and writes no MCP config. When a live S3-compatible server sits on the global endpoint, the request is read as a bucket named api, and the exit code is 254: AWS: [ERROR]: An error occurred (404) when calling the ListSkills operation: NoSuchBucketThe specified bucket does not exist... api AWS agent-toolkit add-skill --skill-name AWS-iam fails the same way, with <BucketName>skills</BucketName>. ### Reproduction Steps Nothing listens on port 9 inside the container, so no emulator is needed: mkdir -p /tmp/atk-home/.Claude Docker run --rm -v /tmp/atk-home:/root -e AWS_ENDPOINT_URL=http://127.0.0.1:9 amazon/AWS-cli:2.37.4 configure agent-toolkit --yes A profile-level endpoint gives the same error: [default] region = us-east-1 endpoint_url = http://127.0.0.1:9 --debug shows Found endpoint for agenttoolkit via: environment_global. Workarounds that work on 2.37.4: - Set