# AWS Troubleshooting

Source: https://wraps.dev/docs/guides/aws-setup/troubleshooting

Common AWS credential and setup issues with solutions.

Quick Diagnostic

Run our diagnostic tool to automatically detect and suggest fixes for common issues:

terminal.sh

```
npx @wraps.dev/cli aws doctor
```

## Common Issues

Unable to locate credentials

`Unable to locate credentials. You can configure credentials by running "aws configure".`

#### Possible Causes

-   AWS CLI not configured
-   No ~/.aws/credentials file
-   AWS\_PROFILE environment variable set to non-existent profile

#### Solutions

Run aws configure

```
aws configure
```

Enter your Access Key ID, Secret Key, and region

Check AWS\_PROFILE

```
echo $AWS_PROFILE
```

Make sure the profile exists or unset the variable

Verify credentials file

```
cat ~/.aws/credentials
```

Should show \[default\] section with keys

Invalid security token

`The security token included in the request is invalid.`

#### Possible Causes

-   Expired temporary credentials (SSO or assumed role)
-   Access key was deleted in AWS Console
-   Typo in access key or secret key

#### Solutions

Refresh SSO session

```
aws sso login
```

If using AWS SSO, re-authenticate

Reconfigure credentials

```
aws configure
```

Enter fresh credentials from AWS Console

Access Denied

`An error occurred (AccessDenied) when calling the ... operation: User: ... is not authorized to perform: ...`

#### Possible Causes

-   IAM user missing required permissions
-   Service Control Policies (SCPs) blocking access
-   Wrong AWS account

#### Solutions

Check current identity

```
aws sts get-caller-identity
```

Verify you're using the right account/user

Add permissions

Attach AdministratorAccess policy or the required permissions to your IAM user

Region not set

`You must specify a region. You can also configure your region by running "aws configure".`

#### Possible Causes

-   No default region configured
-   AWS\_REGION environment variable not set

#### Solutions

Set region in shell

```
export AWS_REGION=us-east-1
```

Temporarily set region for current session

Configure default region

```
aws configure set region us-east-1
```

Permanently set default region

SES in sandbox mode

`Email address is not verified. The following identities failed the check in region...`

#### Possible Causes

-   New AWS accounts start in SES sandbox mode
-   Sandbox limits sending to verified emails only

#### Solutions

Verify recipient email

```
aws ses verify-email-identity --email-address recipient@example.com
```

For testing, verify recipient addresses

Request production access

Submit a request to move out of sandbox: AWS Console → SES → Account Dashboard → Request Production Access

AWS CLI not found

`command not found: aws`

#### Possible Causes

-   AWS CLI not installed
-   Not in PATH

#### Solutions

macOS installation

```
brew install awscli
```

Install via Homebrew

Linux installation

```
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && unzip awscliv2.zip && sudo ./aws/install
```

Download and install from AWS

Verify installation

```
which aws && aws --version
```

Check if AWS CLI is in PATH

Profile not found

`The config profile (profile-name) could not be found`

#### Possible Causes

-   AWS\_PROFILE set to non-existent profile
-   Typo in profile name
-   Profile not in ~/.aws/config or ~/.aws/credentials

#### Solutions

List available profiles

```
cat ~/.aws/credentials | grep '\[' && cat ~/.aws/config | grep '\[profile'
```

See all configured profiles

Use default profile

```
unset AWS_PROFILE
```

Remove AWS\_PROFILE to use default

## Still Having Issues?

### Interactive Setup Wizard

Our setup wizard can detect your current state and guide you through exactly what you need:

```
npx @wraps.dev/cli aws setup
```

### AWS Documentation

For advanced configuration options, see the official AWS CLI documentation:

-   [AWS CLI Configuration Basics](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html)
-   [AWS SSO Configuration](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html)
-   [IAM Troubleshooting](https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot.html)
