code: func (agent *ecsAgent) getEC2InstanceID() string {
  	instanceID, err := agent.ec2MetadataClient.InstanceID()
  	if err != nil {
  		seelog.Warnf(
  			"Unable to access EC2 Metadata service to determine EC2 ID: %v", err)
  		return ""
  	}
  	return instanceID
  }
docs: // getEC2InstanceID gets the EC2 instance ID from the metadata service