code: def get_aws_meta_data() -> dict:
      """returns aws metadata for current instance
  
      Returns:
          dict: aws metadata
      """
      aws_meta_data = {
          "public-hostname": None,
          "ami-id": None,
          "instance-id": None,
      }
      for key in aws_meta_data.keys():
          resp = requests.get(
              f"http://169.254.169.254/latest/meta-data/{key}",
              timeout=1,
          )
          if resp.status_code != 200:
              continue
          aws_meta_data[key] = resp.text
      if aws_meta_data["instance-id"] is None:
          raise Exception("That is not an AWS environment")
      return aws_meta_data
  
imports: import requests
  import textwrap
  from mindsdb.utilities.config import Config
label_desc: Use image node_id 1 for calling a global function with example usage: get_aws_meta_data() and returns: aws_meta_data