# ami-f4cc1de2 ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20170221 $ ec2metadata --ami-id ami-f4cc1de2
$ dpkg-query --show cloud-init cloud-init 0.7.9-48-g1c795b9-0ubuntu1~16.04.1
$ python3 -c 'from cloudinit import ec2_utils; print(ec2_utils.get_instance_metadata("latest")["iam"])' {'info': {'Code': 'Success', 'InstanceProfileId': 'AIPAJ7VG3LHE4JOYDGNG6', 'InstanceProfileArn': 'arn:aws:iam::950047163771:instance-profile/smtest-ec2-ro', 'LastUpdated': '2017-03-08T19:15:50Z'}}
Notice that the 'security-credentials' entry is missing from the 'info' dict.
# ami-f4cc1de2 ubuntu/ images/ hvm-ssd/ ubuntu- xenial- 16.04-amd64- server- 20170221
$ ec2metadata --ami-id
ami-f4cc1de2
$ dpkg-query --show cloud-init g1c795b9- 0ubuntu1~ 16.04.1
cloud-init 0.7.9-48-
$ python3 -c 'from cloudinit import ec2_utils; print(ec2_ utils.get_ instance_ metadata( "latest" )["iam" ])' eId': 'AIPAJ7VG3LHE4J OYDGNG6' , 'InstanceProfil eArn': 'arn:aws: iam::9500471637 71:instance- profile/ smtest- ec2-ro' , 'LastUpdated': '2017-03- 08T19:15: 50Z'}}
{'info': {'Code': 'Success', 'InstanceProfil
Notice that the 'security- credentials' entry is missing from the 'info' dict.