Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In aws_sdk_organizations list_accounts doesn't return accounts with ID's beginning with "0" #1222

Open
1 task
cariosciot opened this issue Dec 16, 2024 · 2 comments
Labels
bug This issue is a bug. p2 This is a standard priority issue

Comments

@cariosciot
Copy link

Describe the bug

In aws_sdk_organizations list_accounts doesn't return information for account with ID's beginning either "0"

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

list_accounts ought to return all accounts for an organization regardless of the first digit of the ID

Current Behavior

list_accounts only returns account ID's that do not begin with 0.

Reproduction Steps

For use in an organization account that has a member account with an ID beginning with "0"

use aws_config::{meta::region::RegionProviderChain, BehaviorVersion};


#[tokio::main]
async fn main() {
    let region_provider = RegionProviderChain::default_provider().or_else("us-east-1");
    let config = aws_config::defaults(BehaviorVersion::latest())
        .region(region_provider)
        .load()
        .await;

    let org_client = aws_sdk_organizations::Client::new(&config);
    let accounts = match org_client.list_accounts().send().await {
        Ok(accounts) => accounts,
        Err(e) => panic!("Error: {}", e),
    };
    for account in accounts.accounts() {
        println!("{} - {}", account.id().unwrap(), account.name().unwrap());
    }
}

Possible Solution

No response

Additional Information/Context

No response

Version

├── aws-config v1.5.10
│   ├── aws-credential-types v1.2.1
│   │   ├── aws-smithy-async v1.2.2
│   │   ├── aws-smithy-runtime-api v1.7.3
│   │   │   ├── aws-smithy-async v1.2.2 (*)
│   │   │   ├── aws-smithy-types v1.2.10
│   │   ├── aws-smithy-types v1.2.10 (*)
│   ├── aws-runtime v1.4.4
│   │   ├── aws-credential-types v1.2.1 (*)
│   │   ├── aws-sigv4 v1.2.6
│   │   │   ├── aws-credential-types v1.2.1 (*)
│   │   │   ├── aws-smithy-http v0.60.11
│   │   │   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   │   │   ├── aws-smithy-types v1.2.10 (*)
│   │   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   │   ├── aws-smithy-types v1.2.10 (*)
│   │   ├── aws-smithy-async v1.2.2 (*)
│   │   ├── aws-smithy-http v0.60.11 (*)
│   │   ├── aws-smithy-runtime v1.7.5
│   │   │   ├── aws-smithy-async v1.2.2 (*)
│   │   │   ├── aws-smithy-http v0.60.11 (*)
│   │   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   │   ├── aws-smithy-types v1.2.10 (*)
│   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   ├── aws-smithy-types v1.2.10 (*)
│   │   ├── aws-types v1.3.3
│   │   │   ├── aws-credential-types v1.2.1 (*)
│   │   │   ├── aws-smithy-async v1.2.2 (*)
│   │   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   │   ├── aws-smithy-types v1.2.10 (*)
│   ├── aws-sdk-sso v1.50.0
│   │   ├── aws-credential-types v1.2.1 (*)
│   │   ├── aws-runtime v1.4.4 (*)
│   │   ├── aws-smithy-async v1.2.2 (*)
│   │   ├── aws-smithy-http v0.60.11 (*)
│   │   ├── aws-smithy-json v0.61.1
│   │   │   └── aws-smithy-types v1.2.10 (*)
│   │   ├── aws-smithy-runtime v1.7.5 (*)
│   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   ├── aws-smithy-types v1.2.10 (*)
│   │   ├── aws-types v1.3.3 (*)
│   ├── aws-sdk-ssooidc v1.51.0
│   │   ├── aws-credential-types v1.2.1 (*)
│   │   ├── aws-runtime v1.4.4 (*)
│   │   ├── aws-smithy-async v1.2.2 (*)
│   │   ├── aws-smithy-http v0.60.11 (*)
│   │   ├── aws-smithy-json v0.61.1 (*)
│   │   ├── aws-smithy-runtime v1.7.5 (*)
│   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   ├── aws-smithy-types v1.2.10 (*)
│   │   ├── aws-types v1.3.3 (*)
│   ├── aws-sdk-sts v1.51.0
│   │   ├── aws-credential-types v1.2.1 (*)
│   │   ├── aws-runtime v1.4.4 (*)
│   │   ├── aws-smithy-async v1.2.2 (*)
│   │   ├── aws-smithy-http v0.60.11 (*)
│   │   ├── aws-smithy-json v0.61.1 (*)
│   │   ├── aws-smithy-query v0.60.7
│   │   │   ├── aws-smithy-types v1.2.10 (*)
│   │   ├── aws-smithy-runtime v1.7.5 (*)
│   │   ├── aws-smithy-runtime-api v1.7.3 (*)
│   │   ├── aws-smithy-types v1.2.10 (*)
│   │   ├── aws-smithy-xml v0.60.9
│   │   ├── aws-types v1.3.3 (*)
│   ├── aws-smithy-async v1.2.2 (*)
│   ├── aws-smithy-http v0.60.11 (*)
│   ├── aws-smithy-json v0.60.7
│   │   └── aws-smithy-types v1.2.10 (*)
│   ├── aws-smithy-runtime v1.7.5 (*)
│   ├── aws-smithy-runtime-api v1.7.3 (*)
│   ├── aws-smithy-types v1.2.10 (*)
│   ├── aws-types v1.3.3 (*)
├── aws-sdk-organizations v1.57.0
│   ├── aws-credential-types v1.2.1 (*)
│   ├── aws-runtime v1.4.4 (*)
│   ├── aws-smithy-async v1.2.2 (*)
│   ├── aws-smithy-http v0.60.11 (*)
│   ├── aws-smithy-json v0.61.1 (*)
│   ├── aws-smithy-runtime v1.7.5 (*)
│   ├── aws-smithy-runtime-api v1.7.3 (*)
│   ├── aws-smithy-types v1.2.10 (*)
│   ├── aws-types v1.3.3 (*)



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

MacOS - 15.2 (24C101)

### Logs

_No response_
@cariosciot cariosciot added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Dec 16, 2024
@landonxjames
Copy link
Contributor

Do you happen to know if this issue is present with other SDKs or the AWS CLI? This sounds like a service bug, I don't think we would be doing anything that would filter out accounts starting with 0.

@jmklix jmklix added response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. p2 This is a standard priority issue and removed needs-triage This issue or PR still needs to be triaged. labels Dec 20, 2024
@cariosciot
Copy link
Author

I have tried it with both the AWS CLI and the boto3 library in python and it works in those. I'm not sure if the typing in rust is causing issues?

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. label Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. p2 This is a standard priority issue
Projects
None yet
Development

No branches or pull requests

3 participants