If executing the userdata after the initial launch, add the below before your #!/bin/bash :
Content-Type: multipart/mixed; boundary="//" MIME-Version: 1.0
--// Content-Type: text/cloud-config; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cloud-config.txt"
#cloud-config cloud_final_modules:
- [scripts-user, always]
--// Content-Type: text/x-shellscript; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="userdata.txt"
replied 3 years ago
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
When using Graviton hosts, in step 4 replace _amd64 with _arm64 in the .deb or .rpm download URL.
E.g. for RHEL9 you must use:
sudo dnf install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_arm64/amazon-ssm-agent.rpm
replied 3 years ago
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
Since Red Hat Enterprise Linux (RHEL) 7, and CentOS 7 (64 bit) does not use DNF by default unless installed, you can have them under yum section.
replied a year ago
This article was reviewed and updated on 2026-04-28
Relevant content
asked 2 years ago
- AWS OFFICIALUpdated 6 months ago

