AWS ec2 documentation change
Summary
Added PowerShell V5 example for creating key pairs with ASCII encoding requirement
Security assessment
Emphasizes proper ASCII encoding for valid private key generation, which is a security best practice but doesn't address a specific vulnerability
Diff
diff --git a/ec2/latest/devguide/example_ec2_CreateKeyPair_section.md b/ec2/latest/devguide/example_ec2_CreateKeyPair_section.md index c803d6698..24a5cb38f 100644 --- a//ec2/latest/devguide/example_ec2_CreateKeyPair_section.md +++ b//ec2/latest/devguide/example_ec2_CreateKeyPair_section.md @@ -460,0 +461,14 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example creates a key pair and captures the PEM-encoded RSA private key in a file with the specified name. When you are using PowerShell, the encoding must be set to ascii to generate a valid key. For more information, see Create, Display, and Delete Amazon EC2 Key Pairs (https://docs.aws.amazon.com/cli/latest/userguide/cli-services-ec2-keypairs.html) in the AWS Command Line Interface User Guide.** + + + (New-EC2KeyPair -KeyName "my-key-pair").KeyMaterial | Out-File -Encoding ascii -FilePath C:\path\my-key-pair.pem + + + * For API details, see [CreateKeyPair](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +