- Installation of specific software and packages.
- Operating system updates.
- File downloads from the internet.
- Service configurations.
- Execution of additional custom scripts.

Key Considerations for EC2 User Data Scripts
Ensure that your user data script is correctly configured to run during your instance’s startup. Proper scripting helps maintain consistency and saves time during instance provisioning.
- Base64 Encoding: The script must be base64 encoded. When uploading your script via the AWS Console, this encoding is handled automatically.
- Size Limitation: The raw script is limited to 16 kilobytes before encoding.
- Automatic Decoding: AWS decodes the script during the instance’s startup process.
- Opaque Handling: The user data is treated as opaque data, meaning the instance interprets it exactly as provided.

A lengthy user data script can extend your system’s boot time. Ensure your script is optimized to avoid unnecessary delays during startup.