Skip to content

Support IMDS V2.1 #3255

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

Open
wants to merge 46 commits into
base: version-3
Choose a base branch
from
Open

Support IMDS V2.1 #3255

wants to merge 46 commits into from

Conversation

jterapin
Copy link
Contributor

@jterapin jterapin commented Jun 5, 2025

Context

This PR adds support for IMDS V2.1 - which includes sourcing of account id with credentials. If the underlying EC2 instance's IMDS supports it - the provider can retrieve credentials that include an account ID. Then, this account ID can be used by account-based endpoints.

In addition to the feature above, here is a high-level overview of the changes:

  • TODO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

  1. To make sure we include your contribution in the release notes, please make sure to add description entry for your changes in the "unreleased changes" section of the CHANGELOG.md file (at corresponding gem). For the description entry, please make sure it lives in one line and starts with Feature or Issue in the correct format.

  2. For generated code changes, please checkout below instructions first:
    https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md

Thank you for your contribution!

@aws aws deleted a comment from github-actions bot Jun 6, 2025
@aws aws deleted a comment from github-actions bot Jun 6, 2025
Copy link
Contributor

@mullermp mullermp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not review testing.

@aws aws deleted a comment from github-actions bot Jun 11, 2025
@aws aws deleted a comment from github-actions bot Jun 11, 2025
Copy link
Contributor

@mullermp mullermp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not look at tests but I will after follow up.

@aws aws deleted a comment from github-actions bot Jun 13, 2025
@jterapin jterapin changed the title [WIP] IMDS V2.1 Support IMDS V2.1 Jun 13, 2025
# Metadata Token used for fetching Metadata Profile Credentials, defaults
# to 21600 seconds
# @option options [Callable] before_refresh Proc called before
# @option options [Aws::EC2Metadata] :ec2_metadata A custom EC2 metadata
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: I'll double check these options yardoc inheritance on monday (i'm gonna check to make sure that things are rendering correctly...)

Copy link

github-actions bot commented Jun 14, 2025

Detected 1 possible performance regressions:

  • aws-sdk-kinesis.require_time - z-score regression: 2.84 -> 14.68. Z-score: 26.43

Copy link

Detected 6 possible performance regressions:

  • aws-sdk-cloudwatch.client_mem_allocated - z-score regression: 0.72 -> 0.72. Z-score: 17.18
  • aws-sdk-cloudwatchlogs.client_mem_allocated - z-score regression: 0.73 -> 0.73. Z-score: 17.18
  • aws-sdk-dynamodb.client_mem_allocated - z-score regression: 0.76 -> 0.77. Z-score: 17.18
  • aws-sdk-kinesis.client_mem_allocated - z-score regression: 0.79 -> 0.8. Z-score: 17.18
  • aws-sdk-s3.client_mem_allocated - z-score regression: 1.34 -> 1.34. Z-score: 17.18
  • aws-sdk-sns.client_mem_allocated - z-score regression: 0.72 -> 0.72. Z-score: 17.18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants