【发布时间】:2017-10-19 07:51:30
【问题描述】:
谁能指出 Boto3(resource-level) KeyPair 和 KeypairInfo 对象的目的是什么?文档又是模糊的..
import boto3
ec2 = boto3.resource('ec2')
key_pair = ec2.KeyPair('name')
key_pair = ec2.KeyPairInfo('name')
重要的是,KeyPairInfo 根本不起作用:AttributeError: 'ec2.ServiceResource' object has no attribute 'KeyPairInfo'
另外:
AttributeError: 'ec2.KeyPairInfo' object has no attribute 'key_material'。这是因为key_material 在创建时只提供给用户一次。仅供参考,我主要与botocore(client)合作
【问题讨论】:
标签: python amazon-web-services amazon-ec2 boto3