AWS code-library documentation change
Summary
Added PowerShell V5 example for DeleteKeyPair with confirmation prompt
Security assessment
Documents proper key pair management which is a security best practice, but doesn't address a specific vulnerability.
Diff
diff --git a/code-library/latest/ug/ec2_example_ec2_DeleteKeyPair_section.md b/code-library/latest/ug/ec2_example_ec2_DeleteKeyPair_section.md index 6d5bc5de9..fc79d0512 100644 --- a//code-library/latest/ug/ec2_example_ec2_DeleteKeyPair_section.md +++ b//code-library/latest/ug/ec2_example_ec2_DeleteKeyPair_section.md @@ -412,0 +413,22 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example deletes the specified key pair. You are prompted for confirmation before the operation proceeds, unless you also specify the Force parameter.** + + + Remove-EC2KeyPair -KeyName my-key-pair + + +**Output:** + + + Confirm + Are you sure you want to perform this action? + Performing operation "Remove-EC2KeyPair (DeleteKeyPair)" on Target "my-key-pair". + [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): + + * For API details, see [DeleteKeyPair](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +