AWS AWSEC2 documentation change
Summary
Fixed PowerShell syntax for IMDSv2 token retrieval: Added -Uri parameter and -UseBasicParsing flag, corrected variable casing from $Token to $token.
Security assessment
The changes are syntax corrections and parameter additions for command accuracy. While IMDSv2 is security-related, these specific changes don't address a vulnerability or add new security content - they simply fix example formatting.
Diff
diff --git a/AWSEC2/latest/UserGuide/retrieve-iid.md b/AWSEC2/latest/UserGuide/retrieve-iid.md index c88e8f472..2ee652852 100644 --- a//AWSEC2/latest/UserGuide/retrieve-iid.md +++ b//AWSEC2/latest/UserGuide/retrieve-iid.md @@ -32 +32 @@ Run the following cmdlet from your Windows instance to retrieve the instance ide - http://169.254.169.254/latest/api/token).Content + -Method PUT -Uri 'http://169.254.169.254/latest/api/token' -UseBasicParsing).Content @@ -35,2 +35,2 @@ Run the following cmdlet from your Windows instance to retrieve the instance ide - (Invoke-WebRequest -Headers @{'X-aws-ec2-metadata-token' = $Token} ` - http://169.254.169.254/latest/dynamic/instance-identity/document).Content + (Invoke-WebRequest -Headers @{'X-aws-ec2-metadata-token' = $token} ` + -Uri 'http://169.254.169.254/latest/dynamic/instance-identity/document' -UseBasicParsing).Content