【发布时间】:2019-11-21 20:52:08
【问题描述】:
我无法使用 boto3 创建 EC2 实例。
我正在尝试使用 boto3 创建一个实例。
ec2 = boto3.resource('ec2')
ec2.create_instances(ImageId='ami-0d8f6eb4f641ef691', MinCount=1, MaxCount=1, InstanceType='t2.micro')
我所在的地区是美国东部(俄亥俄州)
我不确定如何找到特定区域的 AMI。我刚刚选择了可用的。
错误信息是
botocore.exceptions.ClientError: An error occurred (InvalidAMIID.NotFound) when calling the RunInstances operation: The image id '[ami-0d8f6eb4f641ef691]' does not exist
我从以下位置复制了 AMI ID:
【问题讨论】:
标签: python-3.x amazon-web-services amazon-ec2 boto3