I am trying to remove packages using a cloud formation template.
I have and can install it using the both packages and files structures but I need to remove one and install a different version.
i.e. remove java 1.6 and install java 1.4

Why don't you just create an AMI with the right packages?
–
ceejayozJan 4 '13 at 2:19

@ceejayoz That's generally not a good idea because it increase the management overhead by "freezing" the underlying system. Every time even a minor change is needed, an entirely new AMI has to be created. It's more flexible to provision at boot.
–
jamiebJan 4 '13 at 15:39

1 Answer
1

CloudFormation templates can execute arbitrary userdata scripts, which means you can do most anything you'd like. Here's one sophisticated example, but you could just as easily refer to this puppet guide or the CFN templates page (the highly available RoR template has some nice UserData examples).