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

Identity cache miss for static credentials

Open jdisanti opened this issue 1 year ago • 0 comments
trafficstars

Describe the bug

I had a 19 hour process running uploading to S3 using the SDK with static non-expiring credentials, and over the course of that time, it logged an identity cache miss 80 times:

2023-12-10T00:15:57.659887Z  INFO ThreadId(02) process:lazy_load_identity: aws_smithy_runtime::client::identity::cache::lazy: identity cache miss occurred; added new identity (took Ok(6.925µs))

Expected Behavior

There shouldn't be cache misses for a static identity that doesn't have an expiration time.

Current Behavior

See description.

Reproduction Steps

Make somewhere on the order of 200,000 S3 PutObject requests over the course of 19 hours with:

config.credentials_provider(Credentials::new(
    access_key_id,
    secret_access_key,
    None,
    None,
    "static",
));

Possible Solution

No response

Additional Information/Context

No response

Version

├── aws-sdk-s3 v1.1.0
    │   ├── aws-credential-types v1.0.1
    │   │   ├── aws-smithy-async v1.0.1
    │   │   ├── aws-smithy-runtime-api v1.0.1
    │   │   │   ├── aws-smithy-async v1.0.1 (*)
    │   │   │   ├── aws-smithy-types v1.0.1
    │   │   ├── aws-smithy-types v1.0.1 (*)
    │   ├── aws-http v0.60.0
    │   │   ├── aws-smithy-runtime-api v1.0.1 (*)
    │   │   ├── aws-smithy-types v1.0.1 (*)
    │   │   ├── aws-types v1.0.1
    │   │   │   ├── aws-credential-types v1.0.1 (*)
    │   │   │   ├── aws-smithy-async v1.0.1 (*)
    │   │   │   ├── aws-smithy-runtime-api v1.0.1 (*)
    │   │   │   ├── aws-smithy-types v1.0.1 (*)
    │   ├── aws-runtime v1.0.1
    │   │   ├── aws-credential-types v1.0.1 (*)
    │   │   ├── aws-http v0.60.0 (*)
    │   │   ├── aws-sigv4 v1.0.1
    │   │   │   ├── aws-credential-types v1.0.1 (*)
    │   │   │   ├── aws-smithy-eventstream v0.60.0
    │   │   │   │   ├── aws-smithy-types v1.0.1 (*)
    │   │   │   ├── aws-smithy-http v0.60.0
    │   │   │   │   ├── aws-smithy-eventstream v0.60.0 (*)
    │   │   │   │   ├── aws-smithy-runtime-api v1.0.1 (*)
    │   │   │   │   ├── aws-smithy-types v1.0.1 (*)
    │   │   │   ├── aws-smithy-runtime-api v1.0.1 (*)
    │   │   │   ├── aws-smithy-types v1.0.1 (*)
    │   │   ├── aws-smithy-async v1.0.1 (*)
    │   │   ├── aws-smithy-eventstream v0.60.0 (*)
    │   │   ├── aws-smithy-http v0.60.0 (*)
    │   │   ├── aws-smithy-runtime-api v1.0.1 (*)
    │   │   ├── aws-smithy-types v1.0.1 (*)
    │   │   ├── aws-types v1.0.1 (*)
    │   ├── aws-sigv4 v1.0.1 (*)
    │   ├── aws-smithy-async v1.0.1 (*)
    │   ├── aws-smithy-checksums v0.60.0
    │   │   ├── aws-smithy-http v0.60.0 (*)
    │   │   ├── aws-smithy-types v1.0.1 (*)
    │   ├── aws-smithy-eventstream v0.60.0 (*)
    │   ├── aws-smithy-http v0.60.0 (*)
    │   ├── aws-smithy-json v0.60.0
    │   │   └── aws-smithy-types v1.0.1 (*)
    │   ├── aws-smithy-runtime v1.0.1
    │   │   ├── aws-smithy-async v1.0.1 (*)
    │   │   ├── aws-smithy-http v0.60.0 (*)
    │   │   ├── aws-smithy-protocol-test v0.60.0
    │   │   │   ├── aws-smithy-runtime-api v1.0.1 (*)
    │   │   ├── aws-smithy-runtime-api v1.0.1 (*)
    │   │   ├── aws-smithy-types v1.0.1 (*)
    │   ├── aws-smithy-runtime-api v1.0.1 (*)
    │   ├── aws-smithy-types v1.0.1 (*)
    │   ├── aws-smithy-xml v0.60.0
    │   ├── aws-types v1.0.1 (*)
    ├── aws-smithy-async v1.0.1 (*)
    ├── aws-credential-types v1.0.1 (*)
    ├── aws-runtime v1.0.1 (*)
    ├── aws-smithy-runtime v1.0.1 (*)

Environment details (OS name and version, etc.)

Linux

Logs

No response

jdisanti avatar Dec 10 '23 00:12 jdisanti