-
Notifications
You must be signed in to change notification settings - Fork 1.1k
C++ support AWS_METADATA_SERVICE_TIMEOUT #3493
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
kai-ion
wants to merge
1
commit into
main
Choose a base branch
from
cailinn
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+99
−4
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a1482df
to
35b7c3a
Compare
sbiscigl
reviewed
Jul 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you dont actually pass the configuration to the credentials provider chain initialization so it wont be used. we need that to happen so that the value is used.
src/aws-cpp-sdk-core/include/aws/core/client/ClientConfiguration.h
Outdated
Show resolved
Hide resolved
src/aws-cpp-sdk-core/include/aws/core/client/ClientConfiguration.h
Outdated
Show resolved
Hide resolved
sbiscigl
reviewed
Jul 28, 2025
src/aws-cpp-sdk-core/include/aws/core/config/EC2InstanceProfileConfigLoader.h
Outdated
Show resolved
Hide resolved
src/aws-cpp-sdk-core/include/aws/core/config/EC2InstanceProfileConfigLoader.h
Outdated
Show resolved
Hide resolved
src/aws-cpp-sdk-core/source/config/EC2InstanceProfileConfigLoader.cpp
Outdated
Show resolved
Hide resolved
626c3d9
to
2da1529
Compare
Add ClientConfiguration support for IMDS settings and update related classes Fix: Shared pointer bug in AWSCredentialsProvider allocator mismatch bug fix, change type using c_str() new configuration support for IMDSConfig Add ClientConfiguration support for IMDS settings and update related classes Fix: Shared pointer bug in AWSCredentialsProvider allocator mismatch bug fix, change type using c_str() Fix shared pointer bug and update IMDS config structure - Fix std::stol compilation error with Aws::String by using .c_str() - Update IMDS configuration to use credentialProviderConfig.imdsConfig structure - Add proper environment variable support for AWS_METADATA_SERVICE_TIMEOUT and AWS_METADATA_SERVICE_NUM_ATTEMPTS Update IMDS configuration and credentials provider fix: Remove duplicate IMDS config struct and fix comment syntax feat: Add IMDS configuration support to credential provider chain - Add CredentialProviderConfiguration struct with IMDS timeout and retry settings - Add constructor to DefaultAWSCredentialsProviderChain accepting CredentialProviderConfiguration - Add constructor to InstanceProfileCredentialsProvider accepting CredentialProviderConfiguration - Add constructor to EC2InstanceProfileConfigLoader accepting CredentialProviderConfiguration - Add constructor to EC2MetadataClient accepting CredentialProviderConfiguration with IMDS timeout/retry configuration - Enable IMDS configuration to flow through: CredentialProviderConfiguration → InstanceProfileCredentialsProvider → EC2InstanceProfileConfigLoader → EC2MetadataClient - Reduce object creation redundancy by passing configuration directly through the chain fix disableImdsvV1 member added new include feat: Add IMDS configuration support for AWS_METADATA_SERVICE_TIMEOUT Add support for AWS_METADATA_SERVICE_TIMEOUT and AWS_METADATA_SERVICE_NUM_ATTEMPTS environment variables and config file settings to configure IMDS client behavior. - Add imdsConfig struct to ClientConfiguration.credentialProviderConfig - Support AWS_METADATA_SERVICE_TIMEOUT env var and metadata_service_timeout config - Support AWS_METADATA_SERVICE_NUM_ATTEMPTS env var and metadata_service_num_attempts config - Add InstanceProfileCredentialsProvider constructor accepting ClientConfiguration - Add EC2InstanceProfileConfigLoader constructor accepting CredentialProviderConfiguration - Update EC2MetadataClient to use configured timeout and retry values - Use StringUtils::ConvertToInt32 for parsing instead of std::stol Resolves customer request for configurable IMDS timeout settings. fixed snake case removed m_disableIMDSV1 and comment recreated retry strategy during client configuration updated forward declaration fixed nip
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
Implement a new configuration support for IMDS (Instance Metadata Service), specifically support for environment variable AWS_METADATA_SERVICE_TIMEOUT and AWS_METADATA_SERVICE_NUM_ATTEMPTS . Reference for Amazon EC2 instance metadata.
Check all that applies:
Check which platforms you have built SDK on to verify the correctness of this PR.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.