rubyaws-sdkaws-sdk-rubyamazon-marketplace

AWS marketplace entitlement service api not responding


While trying to get the entitlement informations of a product delivered on AWS:

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

I get:

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

The user in the credentials has:

AWSMarketplaceFullAccess

and

AWSMarketplaceGetEntitlements

This did the same error with us-east-1 as a zone. Would you have any idea on how to resolve this ?


Solution

  • Aws entitlement service doesn't work on all regions (I was on eu-west-1). The client should be initialized like this:

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

    Now there is no error anymore