我正在试图找出为什么我的预留实例而不是正在使用。我正在部署region: us-east-1
并且没有使用us-east-1c
中的可用保留实例。尽管我已经提供了aws-sdk-core
拒绝us-east-1c
子区域的证据,但亚马逊账单告诉我支付高级支持费用:
Seahorse::Client::NetworkingError: unable to connect to `elasticbeanstalk.us-east-1c.amazonaws.com`; SocketError: getaddrinfo: nodename nor servname provided, or not known
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/seahorse/client/net_http/connection_pool.rb:292:in `start_session'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/seahorse/client/net_http/connection_pool.rb:104:in `session_for'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/seahorse/client/net_http/handler.rb:108:in `session'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/seahorse/client/net_http/handler.rb:60:in `transmit'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/seahorse/client/net_http/handler.rb:34:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/seahorse/client/plugins/content_length.rb:12:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/xml/error_handler.rb:8:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/request_signer.rb:85:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/retry_errors.rb:87:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/retry_errors.rb:118:in `retry_request'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/retry_errors.rb:101:in `retry_if_possible'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/retry_errors.rb:89:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/retry_errors.rb:118:in `retry_request'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/retry_errors.rb:101:in `retry_if_possible'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/retry_errors.rb:89:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/retry_errors.rb:118:in `retry_request'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/retry_errors.rb:101:in `retry_if_possible'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/retry_errors.rb:89:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/query/handler.rb:27:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/user_agent.rb:12:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/seahorse/client/plugins/endpoint.rb:34:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/param_validator.rb:21:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/param_converter.rb:21:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/aws-sdk-core/plugins/response_paging.rb:26:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/seahorse/client/plugins/response_target.rb:21:in `call'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/seahorse/client/request.rb:70:in `send_request'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/aws-sdk-core-2.1.26/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/eb_deployer-0.6.3/lib/eb_deployer/aws_driver/beanstalk.rb:20:in `application_exists?'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/eb_deployer-0.6.3/lib/eb_deployer/throttling_handling.rb:13:in `block in method_missing'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/eb_deployer-0.6.3/lib/eb_deployer/utils.rb:13:in `backoff'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/eb_deployer-0.6.3/lib/eb_deployer/throttling_handling.rb:12:in `method_missing'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/eb_deployer-0.6.3/lib/eb_deployer/application.rb:86:in `create_application_if_not_exists'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/eb_deployer-0.6.3/lib/eb_deployer/application.rb:15:in `create_version'
/Users/kross/.rvm/gems/ruby-2.2.2@acme/gems/eb_deployer-0.6.3/lib/eb_deployer.rb:218:in `deploy'
问题:是否有其他人在确保AWS正在使用预留实例时遇到问题?是否有我缺少的配置技巧?
答案 0 :(得分:2)
此论坛帖子详细介绍了实例区域:Placing beanstalk in specific availability zone。 可用区与 Regions 相同,这是我的误解。
例如,这会将其保留到一个特定区域:
[
{ "Namespace":"aws:autoscaling:asg",
"OptionName":"Custom Availability Zones",
"Value":"us-east-1c" },
{ "Namespace":"aws:autoscaling:asg",
"OptionName":"Availability Zones",
"Value":"Any 1" }
]
对于elastic-beanstalk gem,我更改了eb.yml
中的选项:
region: us-east-1
options:
aws:autoscaling:asg:
'Custom Availability Zones': us-east-1c
'Availability Zones': Any 1
对于多个AZ,这可能类似于:
region: us-east-1
options:
aws:autoscaling:asg:
'Custom Availability Zones': 'us-east-1c, us-east-1d'
'Availability Zones': Any 2