AWS ec2: Show base64 user data and use file:// in modify-instance-attribute example
Summary
Adds the base64-encoded contents of UserData.base64.txt and changes the CLI argument from 'fileb://UserData.base64.txt' to 'file://UserData.base64.txt'.
Security assessment
Corrects how an already-base64-encoded user data file is passed to the CLI (file:// instead of fileb://, which would double-encode). The sample script only runs yum update and starts httpd, so there is no credential or vulnerability content.
Evidence
+ --value file://UserData.base64.txt
Diff
diff --git a/ec2/latest/devguide/example_ec2_ModifyInstanceAttribute_section.md b/ec2/latest/devguide/example_ec2_ModifyInstanceAttribute_section.md index def5694..24d11de 100644 --- a//ec2/latest/devguide/example_ec2_ModifyInstanceAttribute_section.md +++ b//ec2/latest/devguide/example_ec2_ModifyInstanceAttribute_section.md @@ -95,0 +96,5 @@ The `certutil` command displays output similar to the following: +Contents of `UserData.base64.txt`: + + + IyEvYmluL2Jhc2gKeXVtIHVwZGF0ZSAteQpzZXJ2aWNlIGh0dHBkIHN0YXJ0CmNoa2NvbmZpZyBodHRwZCBvbgo= + @@ -102 +107 @@ Now you can reference that file in the following CLI command. - --value fileb://UserData.base64.txt + --value file://UserData.base64.txt