您可以修改由按需实例组成的AWS舰队吗?

时间:2018-08-09 15:03:03

标签: amazon-web-services amazon-ec2 aws-cli

我有一个EC2 Fleet,完全由按需实例组成(没有竞价型实例)。

是否可以通过此配置扩大/缩小舰队?

documentation似乎暗示如果type: maintain

应该有可能
Note

You can only modify an EC2 Fleet that has Type=maintain.

看着我的舰队,我看到了。

[user@host]$ aws ec2 describe-fleets | jq '.Fleets[] | select(.FleetState=="active") | .Type' 
"maintain"

当我尝试修改舰队时,我得到以下信息:

[user@host]$ aws ec2 modify-fleet --fleet-id <id> --target-capacity-specification TotalTargetCapacity=15 --dry-run
An error occurred (DryRunOperation) when calling the ModifyFleet operation: Request would have succeeded, but DryRun flag is set.

[user@host]$ aws ec2 modify-fleet --fleet-id <id> --target-capacity-specification TotalTargetCapacity=15
An error occurred (InternalError) when calling the ModifyFleet operation (reached max retries: 4): An internal error has occurred

使用--debug标志似乎并不能提供更多信息。

2018-08-09 14:58:54,596 - MainThread - botocore.endpoint - DEBUG - Sending http request: <PreparedRequest [POST]>
2018-08-09 14:58:54,596 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - INFO - Starting new HTTPS connection (1): ec2.us-east-1.amazonaws.com
2018-08-09 14:58:54,666 - MainThread - botocore.vendored.requests.packages.urllib3.connectionpool - DEBUG - "POST / HTTP/1.1" 500 None
2018-08-09 14:58:54,667 - MainThread - botocore.parsers - DEBUG - Response headers: {'transfer-encoding': 'chunked', 'date': 'Thu, 09 Aug 2018 14:58:54 GMT', 'connection': 'close', 'server': 'AmazonEC2'}
2018-08-09 14:58:54,668 - MainThread - botocore.parsers - DEBUG - Response body:
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>InternalError</Code><Message>An internal error has occurred</Message></Error></Errors><RequestID>id</RequestID></Response>
2018-08-09 14:58:54,668 - MainThread - botocore.hooks - DEBUG - Event needs-retry.ec2.ModifyFleet: calling handler <botocore.retryhandler.RetryHandler object at 0x7fa991c132d0>
2018-08-09 14:58:54,668 - MainThread - botocore.retryhandler - DEBUG - retry needed: retryable HTTP status code received: 500
2018-08-09 14:58:54,668 - MainThread - botocore.retryhandler - DEBUG - Retry needed, action of: 0.866308314038
2018-08-09 14:58:54,668 - MainThread - botocore.endpoint - DEBUG - Response received to retry, sleeping for 0.866308314038 seconds

0 个答案:

没有答案