AWS Security ChangesHomeSearch

AWS ec2: Fixed userData CLI example to use fileb:// prefix

Service: ec2 · 2026-10-09 · Documentation low

File: ec2/latest/devguide/example_ec2_ModifyInstanceAttribute_section.md

Summary

The ModifyInstanceAttribute CLI example now passes the base64 user data file with the binary-safe 'fileb://' prefix instead of 'file://'.

Security assessment

The change corrects how the AWS CLI loads a base64-encoded user data file (binary vs text read) so the example works as intended; it is a correctness fix, not a fix for a specific vulnerability, though user data can carry sensitive bootstrap content.

Evidence

+        --attribute userData --value fileb://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 90b4d2c..ce1ad6f 100644
--- a//ec2/latest/devguide/example_ec2_ModifyInstanceAttribute_section.md
+++ b//ec2/latest/devguide/example_ec2_ModifyInstanceAttribute_section.md
@@ -103 +103 @@ Now you can reference that file in the CLI command that follows:
-        --attribute userData --value file://UserData.base64.txt
+        --attribute userData --value fileb://UserData.base64.txt