in ec2instanceconnectcli/EC2InstanceConnectCLI.py [0:0]
def handle_keys(self):
"""
Pushes the public key to the EC2 Instance(s) using AWS EC2 Instance Connect
"""
for bundle in self.instance_bundles:
session = bundle['session']
if len(bundle['instance_id']) == 0:
self.logger.debug("{0} does not require pushing public key using EC2InstanceConnect".format(bundle['target']))
continue
key_publisher.push_public_key(session, bundle['instance_id'], bundle['username'], self.pub_key, bundle['zone'])
self.logger.debug('Successfully pushed the public key to {0}'.format(bundle['instance_id']))