For apps that have any kind of indirect network configuration (e.g. docker, k8s, ECS, etc), the InstanceProfileCredentialsProvider now hangs for 10 seconds before providing credentials. This has been reported in other SDKs:
aws/aws-sdk-ruby#2177
aws/aws-sdk-go#2972
The problem appears to be that the SDK now uses PUT /latest/api/token to create credentials, but this PUT API is subject to a hop limit so the request does not succeed. Instead it hangs waiting for a response. After 10 seconds a timeout exception is thrown and the SDK falls back to the usual GET /latest/meta-data/iam/security-credentials/... which succeeds.
This can be fixed like:
aws ec2 modify-instance-metadata-options --instance-id <instance ID> --http-put-response-hop-limit 3 --http-endpoint enabled
however it seems like a major issue that all instances will now need to be modified in this way.
For apps that have any kind of indirect network configuration (e.g. docker, k8s, ECS, etc), the InstanceProfileCredentialsProvider now hangs for 10 seconds before providing credentials. This has been reported in other SDKs:
aws/aws-sdk-ruby#2177
aws/aws-sdk-go#2972
The problem appears to be that the SDK now uses
PUT /latest/api/tokento create credentials, but thisPUTAPI is subject to a hop limit so the request does not succeed. Instead it hangs waiting for a response. After 10 seconds a timeout exception is thrown and the SDK falls back to the usualGET /latest/meta-data/iam/security-credentials/...which succeeds.This can be fixed like:
however it seems like a major issue that all instances will now need to be modified in this way.