Unverified Commit 424d7367 authored by Joseph Klix's avatar Joseph Klix Committed by GitHub
Browse files

Docker hop limit (#1449)

* Docker settings

add note on settings needed when using sdk inside docker container

* update changelog.next

* move to group relevant info

* mark code snippet as txt
parent 52c1174a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -21,3 +21,9 @@ message = "Add a trailing slash to the URI `/latest/meta-data/iam/security-crede
references = ["aws-sdk-rust#560", "smithy-rs#1487"]
meta = { "breaking" = false, "tada" = false, "bug" = true }
author = "rcoh"

[[aws-sdk-rust]]
message = "Add comments for docker settings needed when using this sdk"
references = ["aws-sdk-rust#540"]
meta = { "breaking" = false, "tada" = false, "bug" = false }
author = "jmklix"
+10 −0
Original line number Diff line number Diff line
@@ -63,6 +63,16 @@ fn user_agent() -> AwsUserAgent {
/// [transitioning to IMDSv2](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html#instance-metadata-transition-to-version-2)
/// for more information._
///
/// **Note**: When running in a Docker container, all network requests will incur an additional hop. When combined with the default IMDS hop limit of 1, this will cause requests to IMDS to timeout! To fix this issue, you'll need to set the following instance metadata settings :
/// ```txt
/// amazonec2-metadata-token=required
/// amazonec2-metadata-token-response-hop-limit=2
/// ```
///
/// On an instance that is already running, these can be set with [ModifyInstanceMetadataOptions](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceMetadataOptions.html). On a new instance, these can be set with the `MetadataOptions` field on [RunInstances](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html).
///
/// For more information about IMDSv2 vs. IMDSv1 see [this guide](https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/configuring-instance-metadata-service.html)
///
/// # Client Configuration
/// The IMDS client can load configuration explicitly, via environment variables, or via
/// `~/.aws/config`. It will first attempt to resolve an endpoint override. If no endpoint