AWS marketplace授权服务api无响应

时间:2017-11-02 12:55:48

标签: ruby aws-sdk aws-sdk-ruby amazon-marketplace

尝试获取在AWS上交付的产品的权利信息时:

require 'aws-sdk'
client = Aws::MarketplaceEntitlementService::Client.new
client.get_entitlements({product_code: "#{product_id}"})

我明白了:

Seahorse::Client::NetworkingError: Failed to open TCP connection to entitlement.marketplace.eu-west-1.amazonaws.com:443 (getaddrinfo: Name or service not known)

凭据中的用户具有:

  

AWSMarketplaceFullAccess

  

AWSMarketplaceGetEntitlements

这与us-east-1作为区域做了同样的错误。 你对如何解决这个问题有任何想法吗?

1 个答案:

答案 0 :(得分:0)

Aws权利服务并不适用于所有地区(我在eu-west-1上)。 客户端应该像这样初始化:

client = Aws::MarketplaceEntitlementService::Client.new(region: "us-east-1")

现在不再有错误了