1

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 ?

Kayofeld
  • 139
  • 1
  • 11

1 Answers1

2

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

Kayofeld
  • 139
  • 1
  • 11
  • Does this mean that the entitlement service now fully works but talks with the US server instead of the EU one even if you're located in EU and have other services in the EU regions? – Rok Jul 19 '19 at 07:30
  • To answer my own question, yes it works. All the services have to use the same region to cooperate though, for example entitlement and metering services. – Rok Aug 29 '19 at 11:08