Tweaking the cfn template

added java configuration and changed the sshkey lookup method