2017-11-20 7 views
0

私はこのSDKの他の宝石と一緒に作業していましたが、この問題は以前は見たことがありませんでした。私は、価格設定ク​​ライアントを作成し、いくつかのサービス記述を取得しようとしているが、私はこの例外を得ていると私はなぜわからない:AWS Ruby SDK価格設定の宝石Aws :: Errors :: NoSuchEndpointError

require 'aws-sdk-pricing' 

c = Aws::Pricing::Client.new(region: 'eu-west-1') 
r = c.describe_services({ format_version: "aws_v1", max_results: 1, 
    service_code: "AmazonEC2" }) 

と私が手:

Aws::Errors::NoSuchEndpointError: Encountered a SocketError while attempting to connect to:

https://api.pricing.eu-west-1.amazonaws.com

This is typically the result of an invalid :region option or a poorly formatted :endpoint option.

  • Avoid configuring the :endpoint option directly. Endpoints are constructed from the :region . The :endpoint option is reserved for connecting to non-standard test endpoints.

  • Not every service is available in every region.

  • Never suffix region names with availability zones. Use "us-east-1", not "us-east-1a"

Known AWS regions include (not specific to this service):

ap-northeast-1 ap-northeast-2 ap-south-1 ap-southeast-1 ap-southeast-2 ca-central-1 eu-central-1 eu-west-1 eu-west-2 sa-east-1 us-east-1 us-east-2 us-west-1 us-west-2 cn-north-1 us-gov-west-1

私はしました他の地域でこれを試し、同じ結果を得ました。 aws-sdk-ec2のような他の宝石と同じパターンで、問題なくクライアントをインスタンス化できます。私はここで何が欠けていますか?

ありがとうございます。

ルビー2.3.3を使用することは重要です。

答えて

関連する問題