title: Getting tags from python 3 dictionary object. AWS Boto3 Python 3
body: <p>I have a dictionary object that is being returned to me from AWS. I need to pull the tag "based_on_ami" out of this dictionary. I have tried converting to a list, but I am new to programming and have not been able to figure out how to access Tags since they are a few levels down in the dictionary. </p>
  
  <p>What is the best way for me to pull that tag out of the dictionary and put it into a variable i can use?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
     'Images':[
        {
           'Architecture':'x86_64',
           'CreationDate':'2017-11-27T14:41:30.000Z',
           'ImageId':'ami-8e73e0f4',
           'ImageLocation':'23452345234545/java8server_ubuntu16-2b71edd1-f95e-4ee5-8fd6-d8a46975fdb5',
           'ImageType':'machine',
           'Public':False,
           'OwnerId':'23452345234545',
           'State':'available',
           'BlockDeviceMappings':[
              {
                 'DeviceName':'/dev/sda1',
                 'Ebs':{
                    'Encrypted':False,
                    'DeleteOnTermination':True,
                    'SnapshotId':'snap-0c10e8f5ced5b5240',
                    'VolumeSize':8,
                    'VolumeType':'gp2'
                 }
              },
              {
                 'DeviceName':'/dev/sdb',
                 'VirtualName':'ephemeral0'
              },
              {
                 'DeviceName':'/dev/sdc',
                 'VirtualName':'ephemeral1'
              }
           ],
           'EnaSupport':True,
           'Hypervisor':'xen',
           'Name':'java8server_ubuntu16-2b71edd1-f95e-4ee5-8fd6-d8a46975fdb5',
           'RootDeviceName':'/dev/sda1',
           'RootDeviceType':'ebs',
           'SriovNetSupport':'simple',
           'Tags':[
              {
                 'Key':'service',
                 'Value':'baseami'
              },
              {
                 'Key':'cloudservice',
                 'Value':'ami'
              },
              {
                 'Key':'Name',
                 'Value':'java8server_ubuntu16-2b71edd1-f95e-4ee5-8fd6-d8a46975fdb5'
              },
              {
                 'Key':'os',
                 'Value':'ubuntu 16.04 lts'
              },
              {
                 'Key':'based_on_ami',
                 'Value':'ami-aa2ea8d0'
              }
           ],
           'VirtualizationType':'hvm'
        }
     ],
     'ResponseMetadata':{
        'RequestId':'2c376c75-c31f-4aba-a058-173f3b125a00',
        'HTTPStatusCode':200,
        'HTTPHeaders':{
           'content-type':'text/xml;charset=UTF-8',
           'transfer-encoding':'chunked',
           'vary':'Accept-Encoding',
           'date':'Fri, 01 Dec 2017 18:17:53 GMT',
           'server':'AmazonEC2'
        },
        'RetryAttempts':0
     }
  }</code></pre>
  </div>
  </div>
  </p>