# Error: error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found

- **ID:** `terraform/invalid-aws-provider-region`
- **Domain:** terraform
- **Category:** auth_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

AWS provider cannot locate valid credentials in environment variables, shared credentials file, or IAM role.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| AWS Provider v5.0+ | active | — | — |
| Terraform v1.4+ | active | — | — |

## Workarounds

1. **Set AWS credentials via environment variables: export AWS_ACCESS_KEY_ID=xxx; export AWS_SECRET_ACCESS_KEY=xxx** (95% success)
   ```
   Set AWS credentials via environment variables: export AWS_ACCESS_KEY_ID=xxx; export AWS_SECRET_ACCESS_KEY=xxx
   ```
2. **Configure ~/.aws/credentials with a default profile and set AWS_PROFILE=default** (90% success)
   ```
   Configure ~/.aws/credentials with a default profile and set AWS_PROFILE=default
   ```
3. **Use IAM role for EC2 instance (if running on AWS)** (85% success)
   ```
   Use IAM role for EC2 instance (if running on AWS)
   ```

## Dead Ends

- **** — Empty values are treated as invalid; provider still fails to authenticate. (70% fail)
- **** — Provider checks the profile but cannot load credentials, still fails. (50% fail)
