AWS code-library documentation change
Summary
Added PowerShell V5 example for creating IAM access keys with security note
Security assessment
Highlights secure handling of secret keys (e.g., immediate storage) as a security best practice but does not fix a vulnerability.
Diff
diff --git a/code-library/latest/ug/iam_example_iam_CreateAccessKey_section.md b/code-library/latest/ug/iam_example_iam_CreateAccessKey_section.md index 478e3403d..b7c05b1a1 100644 --- a//code-library/latest/ug/iam_example_iam_CreateAccessKey_section.md +++ b//code-library/latest/ug/iam_example_iam_CreateAccessKey_section.md @@ -497,0 +498,23 @@ PowerShell +**Tools for PowerShell V5** + + +**Example 1: This example creates a new access key and secret access key pair and assigns it to the user`David`. Ensure that you save the `AccessKeyId` and `SecretAccessKey` values to a file because this is the only time you can obtain the `SecretAccessKey`. You cannot retrieve it later. If you lose the secret key, you must create a new access key pair.** + + + New-IAMAccessKey -UserName David + + +**Output:** + + + AccessKeyId : AKIAIOSFODNN7EXAMPLE + CreateDate : 4/13/2015 1:00:42 PM + SecretAccessKey : wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY + Status : Active + UserName : David + + * For API details, see [CreateAccessKey](https://docs.aws.amazon.com/powershell/v5/reference) in _AWS Tools for PowerShell Cmdlet Reference (V5)_. + + + +