in cdk/nodegroup/lambda/attach-multus-eni.py [0:0]
def create_interface(subnet_id,sg_id):
network_interface_id = None
if subnet_id:
try:
network_interface = ec2_client.create_network_interface(Groups=[sg_id],SubnetId=subnet_id)
network_interface_id = network_interface['NetworkInterface']['NetworkInterfaceId']
log("Created network interface: {}".format(network_interface_id))
except botocore.exceptions.ClientError as e:
log("Error creating network interface: {}".format(e.response['Error']))
return network_interface_id