1

I can't get the most simple cloudFormation UserData block to work with Centos 6 AMI.

"UserData" : {"Fn::Base64" : { "Fn::Join" : ["",[
    "#!/bin/bash -ex","\n",
    "sudo touch /root/aws-test.txt"]]}
}

It works fine with Amazon Linux but nothing happens with the Centos AMI. Any suggestions?

Just D
  • 11
  • 1

1 Answers1

0

The CentOS AMIs from the marketplace does not include cloud-init, so the UserData is not executed.

See this question about creating a custom CentOS AMI that includes cloud-init: How do I set up cloud-init on custom AMIs in AWS? (CentOS)

Community
  • 1
  • 1
tamas7
  • 116
  • 4