aws / aws/aws-cli

Didn't get DefaultAccountPasswordPolicy When Calling "GetAccountPasswordPolicy" API.

Open
#7,265 14 comments 1 reaction 1 assignee Claimed by @aBurmeseDev View on GitHub
bug iam p2 service-api
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

### Describe the bug

Hi Team, In my AWS Account after creating a custom password policy, called [GetAccountPasswordPolicy](https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountPasswordPolicy.html) API, it returns a proper response But when I delete the custom password policy and then hit the [GetAccountPasswordPolicy](https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountPasswordPolicy.html) API, the response shows `The Password Policy with domain name 12345678912 cannot be found.`

### Expected Behavior

- If the account password policy is default then it should return a proper response as mentioned in below
default password policy

**Default Policy**
![DefaultPasswordPolicy](https://user-images.githubusercontent.com/99860808/189674068-d3225a59-1ea6-4af6-a3c8-1f51d76db9e4.png)

**Expected Response**
```



false
8
true
false
true
false
true
true
true



1234ee3-e316-43b3-9ae3-f18d4113dcbb

```

### Current Behavior

**Default Policy**
![DefaultPasswordPolicy](https://user-images.githubusercontent.com/99860808/189675728-8a54db84-be77-47b6-9c6f-4bbd2f68a7f0.png)

**Current Response**
```


Sender
NoSuchEntity
The Password Policy with domain name 123456789 cannot be found.

1234ee3-bee0-4b38-b237-534db874e627

```

### Reproduction Steps

- Create Custom Account Password Policy And Fire These API [GetAccountPasswordPolicy](https://docs.aws.amazon.com/IAM/latest/APIReference/API_GetAccountPasswordPolicy.html)
- Delete Custome Account Password Policy and Fire the above API
- Compare Responses.

### Possible Solution

- If the Account Password Policy Default, Then as I mentioned in **Expected Behavior** response should be thrown.

### Additional Information/Context

This is not specific to the aws-cli bug, it's problem with the AWS API. I just didn't know where else to report the bug.

### CLI version used

NA

### Environment details (OS name and version, etc.)

Windows 10, Postman

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.