aws-sdk-rust icon indicating copy to clipboard operation
aws-sdk-rust copied to clipboard

SSM GetConnectionStatus returns Unknown for Connected state

Open vladvasiliu opened this issue 3 years ago • 3 comments
trafficstars

Describe the bug

Running GetConnectionStatus from aws_sdk_ssm::client::Client against a running and connected instance returns ConnectionStatus::Unknown("connected").

Expected Behavior

GetConnectionStatus returns ConnectionStatus::Connected if the instance is connected.

Current Behavior

Returns ConnectionStatus::Unknown("connected")

Reproduction Steps

let client = aws_sdk_ssm::client::Client(&aws_config::load_from_env().await);
let res = client
    .get_connection_status()
    .target("i-1234")
    .send()
    .await?;

match res.status {
    None => println!("SSM GetConnectionStatus returned nothing"),
    Some(status) => match status {
        ConnectionStatus::Connected => println!("Connected"),
        ConnectionStatus::NotConnected => println!("Not connected"),
        ConnectionStatus::Unknown(u) => println!("Unknown status: {}", u),
        _ => println!("SSM GetConnectionStatus returned an unknown status."),
    },
}

Possible Solution

This is likely related to an inconsistency between the AWS API docs and the actual API behaviour: https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_GetConnectionStatus.html#API_GetConnectionStatus_ResponseElements says the expected status is "Connected" or "NotConnected", capitalized, whereas the actual result is "connected", no capitalization.

Additional Information/Context

No response

Version

aws-start-stop v0.1.2 (/home/vlad/code/aws-start-stop) ├── aws-config v0.12.0 │ ├── aws-http v0.12.0 │ │ ├── aws-smithy-http v0.42.0 │ │ │ ├── aws-smithy-types v0.42.0 │ │ ├── aws-smithy-types v0.42.0 () │ │ ├── aws-types v0.12.0 │ │ │ ├── aws-smithy-async v0.42.0 │ │ │ ├── aws-smithy-client v0.42.0 │ │ │ │ ├── aws-smithy-async v0.42.0 () │ │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ │ ├── aws-smithy-http-tower v0.42.0 │ │ │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ │ ├── aws-smithy-types v0.42.0 () │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ ├── aws-smithy-types v0.42.0 () │ ├── aws-sdk-sso v0.12.0 │ │ ├── aws-endpoint v0.12.0 │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ ├── aws-types v0.12.0 () │ │ ├── aws-http v0.12.0 () │ │ ├── aws-sig-auth v0.12.0 │ │ │ ├── aws-sigv4 v0.12.0 │ │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ ├── aws-smithy-http v0.42.0 () │ │ │ ├── aws-types v0.12.0 () │ │ ├── aws-smithy-async v0.42.0 () │ │ ├── aws-smithy-client v0.42.0 () │ │ ├── aws-smithy-http v0.42.0 () │ │ ├── aws-smithy-http-tower v0.42.0 () │ │ ├── aws-smithy-json v0.42.0 │ │ │ └── aws-smithy-types v0.42.0 () │ │ ├── aws-smithy-types v0.42.0 () │ │ ├── aws-types v0.12.0 () │ ├── aws-sdk-sts v0.12.0 │ │ ├── aws-endpoint v0.12.0 () │ │ ├── aws-http v0.12.0 () │ │ ├── aws-sig-auth v0.12.0 () │ │ ├── aws-smithy-async v0.42.0 () │ │ ├── aws-smithy-client v0.42.0 () │ │ ├── aws-smithy-http v0.42.0 () │ │ ├── aws-smithy-http-tower v0.42.0 () │ │ ├── aws-smithy-query v0.42.0 │ │ │ ├── aws-smithy-types v0.42.0 () │ │ ├── aws-smithy-types v0.42.0 () │ │ ├── aws-smithy-xml v0.42.0 │ │ ├── aws-types v0.12.0 () │ ├── aws-smithy-async v0.42.0 () │ ├── aws-smithy-client v0.42.0 () │ ├── aws-smithy-http v0.42.0 () │ ├── aws-smithy-http-tower v0.42.0 () │ ├── aws-smithy-json v0.42.0 () │ ├── aws-smithy-types v0.42.0 () │ ├── aws-types v0.12.0 () ├── aws-sdk-ec2 v0.12.0 │ ├── aws-endpoint v0.12.0 () │ ├── aws-http v0.12.0 () │ ├── aws-sig-auth v0.12.0 () │ ├── aws-smithy-async v0.42.0 () │ ├── aws-smithy-client v0.42.0 () │ ├── aws-smithy-http v0.42.0 () │ ├── aws-smithy-http-tower v0.42.0 () │ ├── aws-smithy-query v0.42.0 () │ ├── aws-smithy-types v0.42.0 () │ ├── aws-smithy-xml v0.42.0 () │ ├── aws-types v0.12.0 () ├── aws-sdk-ssm v0.12.0 │ ├── aws-endpoint v0.12.0 () │ ├── aws-http v0.12.0 () │ ├── aws-sig-auth v0.12.0 () │ ├── aws-smithy-async v0.42.0 () │ ├── aws-smithy-client v0.42.0 () │ ├── aws-smithy-http v0.42.0 () │ ├── aws-smithy-http-tower v0.42.0 () │ ├── aws-smithy-json v0.42.0 () │ ├── aws-smithy-types v0.42.0 () │ ├── aws-types v0.12.0 ()

Environment details (OS name and version, etc.)

Linux, stable-x86_64-unknown-linux-gnu, 1.61.0

Logs

No response

vladvasiliu avatar Jun 12 '22 13:06 vladvasiliu

@vladvasiliu Thanks for reporting this issue. You're exactly correct about the cause of the issue. I'm going to file an issue with the SSM team about this.

Velfi avatar Jun 13 '22 19:06 Velfi

The internal ticket ID is V603223427

Velfi avatar Jun 13 '22 19:06 Velfi

Still waiting on a response from the team, I'm going to reach out to them again today.

Velfi avatar Jun 29 '22 15:06 Velfi

The team says they're going to meet soon to decide how to fix this.

Velfi avatar Sep 16 '22 15:09 Velfi

Opened an issue in aws/aws-sdk which is used to track issues across multiple sdks. Closing this issue

jmklix avatar Oct 03 '22 16:10 jmklix

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

github-actions[bot] avatar Oct 03 '22 16:10 github-actions[bot]

@vladvasiliu this issue should now be fixed. Make sure you are using the latest version of the rust sdk and let us know if you have any other problems.

jmklix avatar Oct 04 '23 21:10 jmklix