Template variable Ec2 InstanceID

Yes,

InstanceID is nested under the EC2 attribute. It's not stored as a top
level like hostname, ipaddress, etc.

This thread shows how to use sub-level attributes: