Use a supported AWS SDK
To use IMDSv2, your EC2 instances must use an AWS SDK version that supports using IMDSv2. The latest versions of all the AWS SDKs support using IMDSv2.
Important
We recommend that you to stay up to date with SDK releases to keep up with the latest features, security updates, and underlying dependencies. Continued use of an unsupported SDK version is not recommended and is done at your discretion. For more information, see the AWS SDKs and Tools maintenance policy in the AWS SDKs and Tools Reference Guide.
The following are the minimum versions that support using IMDSv2:
-
AWS CLI
– 1.16.289 -
AWS Tools for Windows PowerShell
– 4.0.1.0 -
AWS SDK for .NET
– 3.3.634.1 -
AWS SDK for C++
– 1.7.229 -
AWS SDK for Go
– 1.25.38 -
AWS SDK for Go v2
– 0.19.0 -
AWS SDK for Java
– 1.11.678 -
AWS SDK for Java 2.x
– 2.10.21 -
AWS SDK for JavaScript in Node.js
– 2.722.0 -
AWS SDK for PHP
– 3.147.7 -
AWS SDK for Python (Botocore)
– 1.13.25 -
AWS SDK for Python (Boto3)
– 1.12.6 -
AWS SDK for Ruby
– 3.79.0