This is a simple little Python script to let you query EC2 metadata from consul-template. It's only requirement is boto. It uses the EC2 internal metadata service so it does not require any API keys or even a region. The only caveat is that this can only be run on a machine on EC2.
You can give no arguments for full dictionary output or one or more arguments to get specific key(s). Put it somewhere on your machine, chmod +x it and give the full path to consul-template.