Setting hostname on AWS EC2 with cloud-init not working

Hi, I am trying to use cloud-init to set my AWS EC2 VMs hostname on first boot. As I understand it, this parameter can be used at the run-instances command:

--user-data I2Nsb3VkLWNvbmZpZwpob3N0bmFtZTogdGVzdDcK

This is a base64 encoded string for:

#cloud-config
hostname: test7

This is functioning correctly for Ubuntu, where the hostname is set at first boot, but on Fedora the hostname remains unset. I am using the latest official image from the AWS AMI Catalog in both cases.

Any help with getting this working would be appreciated.