In order to see the security credentials, you must launch an instance with
iam role attached (--iam-instance-profile). Other wise they do not show up in the metadata service.
Ubuntu cloud-init did not actually show this bug because it read and stored
a version of the metadata service (2009-04-04) that does not have the iam/
credentials.
In order to see the security credentials, you must launch an instance with instance- profile) . Other wise they do not show up in the metadata service.
iam role attached (--iam-
Ubuntu cloud-init did not actually show this bug because it read and stored
a version of the metadata service (2009-04-04) that does not have the iam/
credentials.
This can be verified simply by pprint( pl("/var/ lib/cloud/ instance/ obj.pkl" ).metadata) ' index': '0', path': '(unknown)', device- mapping' : {'ami': '/dev/sda1', 'root': '/dev/sda1'}, e321c', zone': 'us-east-1b'},
'AAAAB3NzaC1y c2EAAAABIwAAAQE A3I7VUf2l5gSn5u avROsc5HRDpZdQu eUq5ozemNSj8T7e nqKHOEaFoU2VoPg GEWC9RyzSQVeyD6 s7APMcE82EtmW4s kVEgEGSbDc1pvxz xtchBj78hJP6Cf5 TCMFSXw+ Fz5rF1dR23QDbN1 mkHs7adr8GW4kSW qU7Q7NDwfIrJJtO 7Hi42GyXtvEONHb iRPOe8stqUly7Mv UoN+5kfjBM8Qqpf l2+FNhTYWpMfYdP UnE7u536WqzFmsa qJctz3gBxH9Ex7d FtrxR4qiqEr9Qtl u3xGn7Bw07/ +i1D+ey3ONkZLN+ LQ714cgj8fRS4Hj 29SCmXp5Kt5/ 82cD/VN3NtHw= = '
'brickies' ]}, bd0ab',
$ sudo python3 -c 'from cloudinit.stages import _pkl_load as pl; import pprint; pprint.
{'ami-id': 'ami-78b7166e',
'ami-launch-
'ami-manifest-
'block-
'hostname': 'ip-10-0-0-160',
'instance-action': 'none',
'instance-id': 'i-00e90430c5db
'instance-type': 't2.micro',
'local-hostname': 'ip-10-0-0-160',
'local-ipv4': '10.0.0.160',
'placement': {'availability-
'profile': 'default-hvm',
'public-hostname': b'',
'public-ipv4': '54.86.100.172',
'public-keys': {'brickies': ['ssh-rsa '
'reservation-id': 'r-07f18d71dc1e
'security-groups': 'wide-open'}
However, the get_instance_ metadata( ) function would show the credentials.
$ python3 -c 'from cloudinit import ec2_utils; print(ec2_ utils.get_ instance_ metadata( "latest" )["iam" ])' leArn': 'arn:aws: iam::9500471637 71:instance- profile/ smtest- ec2-ro' , 'InstanceProfil eId': 'AIPAJ7VG3LHE4J OYDGNG6' , 'Code': 'Success', 'LastUpdated': '2017-03- 08T19:14: 59Z'}, 'security- credentials' : {'smtest-ec2-ro': {'Token': 'FQoDY...Bxgu=', 'AccessKeyId': 'XXXXXXXXXXXXXX XXXXXX' , 'Expiration': '2017-03- 09T01:43: 31Z', 'Code': 'Success', 'SecretAccessKey': 'xxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxx' , 'Type': 'AWS-HMAC', 'LastUpdated': '2017-03- 08T19:14: 40Z'}}}
{'info': {'InstanceProfi