我试图使用以下参数在ec2上运行最大量的实例:
AWSCredentials credentials = new BasicAWSCredentials(accessKey,secretKey);
AmazonEC2Client ec2 = new AmazonEC2Client(credentials);
RunInstancesRequest request = new RunInstancesRequest();
request.setInstanceType(InstanceType.T2Micro.toString());
request.setMinCount(1);
request.setMaxCount(20);
request.setImageId("ami-b73b63a0");
request.setKeyName("hardwell");
request.setUserData(getUserDataScript());
ec2.runInstances(request);
但只有第一个启动,当我第二次尝试运行此代码时,我收到此错误:
Your quota allows for 0 more running instance(s). You requested at least 1
但是最高金额是20.对此的解释是什么?
感谢。
答案 0 :(得分:0)
您似乎已经用尽了Max EC2实例的限制
了解更多在AWS控制台上检查2项内容
从限制中减去运行计数,您将知道可以运行多少实例