If an instance is configured for IMDSv2 then after upgrading AWS-CLI we are able to connect to IMDSv2 , but we can not connect to it from java code.
Also, we could not find any documentation regarding whether we need any specific version of AWS java SDK to support IMDSv2, OR is it supported implicitly, OR is it not supported from JAVA SDK yet.
One more point is , how to ask default provider chain to use IMDSv2 while trying to load credentials.
Please let me know