Chef Client and Attribs

I have a role setup for several of my servers and they share a set of cookbooks. However I’d like to pass in an attribute that contains the nodes name to one of the recipes. I’m using cloudformation in AWS for the servers so I’ve scripted it to provided me the instances name on creation, but can’t seem to get the attribute to pass when the node check in with the chef server. I thought that using the -j option and passing the information in an attribute file would work, but it doesn’t seem to be. I’m not sure if I have to format wrong and can’t find a good example. Does anyone have one they can share with me?