eyaltoledano/claude-task-master · warning

Warning: AWS_ACCESS_KEY_ID and/or AWS_SECRET_ACCESS_KEY envi

Error message

Warning: AWS_ACCESS_KEY_ID and/or AWS_SECRET_ACCESS_KEY environment variables are missing. Will fallback to system configuration (ex: aws config files or ec2 instance profiles).

What it means

In custom-providers.ts Bedrock setup, checkEnvVars verifies AWS credentials. If AWS_ACCESS_KEY_ID and/or AWS_SECRET_ACCESS_KEY are unset, it prints this warning explaining that the AWS SDK will fall back to system configuration (shared credentials/config files or EC2 instance profiles). It always returns true, so setup proceeds; this is advisory only.

Source

Thrown at apps/cli/src/commands/models/custom-providers.ts:79

						`You can check available models with: curl ${urlToCheck}/tags`
					)
				);
			}
			return isValid;
		}
	},
	BEDROCK: {
		id: '__CUSTOM_BEDROCK__',
		name: '* Custom Bedrock model',
		provider: CUSTOM_PROVIDERS.BEDROCK,
		promptMessage: (role) =>
			`Enter the custom Bedrock Model ID for the ${role} role (e.g., anthropic.claude-3-sonnet-20240229-v1:0):`,
		checkEnvVars: () => {
			if (
				!process.env.AWS_ACCESS_KEY_ID ||
				!process.env.AWS_SECRET_ACCESS_KEY
			) {
				console.warn(
					chalk.yellow(
						'Warning: AWS_ACCESS_KEY_ID and/or AWS_SECRET_ACCESS_KEY environment variables are missing. Will fallback to system configuration (ex: aws config files or ec2 instance profiles).'
					)
				);
			}
			return true;
		}
	},
	AZURE: {
		id: '__CUSTOM_AZURE__',
		name: '* Custom Azure OpenAI model',
		provider: CUSTOM_PROVIDERS.AZURE,
		requiresBaseURL: true,
		promptMessage: (role) =>
			`Enter the Azure deployment name for the ${role} role (e.g., gpt-4o):`,
		checkEnvVars: () => {
			if (!process.env.AZURE_OPENAI_API_KEY) {
				console.error(

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Export AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY before running setup.
  2. Source your env file (e.g. `source ~/.env` or `export $(cat .env | xargs)`).
  3. If intentionally relying on system config (~/.aws/credentials, SSO, or instance profile), verify that fallback actually works via `aws sts get-caller-identity`.
  4. Correct variable-name typos in your shell profile or CI secret configuration.

Example fix

// before: shell without credentials
npx task-master models --set-custom bedrock
// after: export credentials first
export AWS_ACCESS_KEY_ID=AKIA...
export AWS_SECRET_ACCESS_KEY=...
npx task-master models --set-custom bedrock
Defensive patterns

Strategy: validation

Validate before calling

if (!process.env.AWS_ACCESS_KEY_ID || !process.env.AWS_SECRET_ACCESS_KEY) {
  throw new Error('Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY before configuring Bedrock.');
}

Prevention

When it happens

Trigger: Running the custom Bedrock model provider setup (role prompt flow) in a shell where neither/one of AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY is exported in the environment.

Common situations: Configuring Bedrock in a fresh terminal without sourcing the env file; CI containers without injected credentials while relying on ~/.aws/credentials or instance profiles; typos in variable names (AWS_ACCESS_KEY vs AWS_ACCESS_KEY_ID).

Understand the failure class

Background: "environment variable is not set" and "Missing keys in environment" errors: what missing required env var messages mean and how to fix them — this error's family across 28 libraries.

Related errors


AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29). Data as JSON: /api/errors/6e922a9a3883039a. Report an issue: GitHub.