Search code examples
c#health-monitoringaws-sdk-net

AmazonAWSHealthClient.DescribeEventsRequest: No such host is known


I want to make a request for the health events on my AWS account. I use this code to do the request:

using (var client = new AmazonAWSHealthClient("accesskey", "privatekey", RegionEndpoint.EUCentral1))
{
    var request = new DescribeEventsRequest();

    var response = client.DescribeEventsAsync(request).Result;
}

But the response is "No such host is known". What do I need to change? Do I need to alter some settings on my AWS account?


Solution

  • I had to switch out the EUCentral1 in the clients constructor for USEast1 and it worked (I was then missing some permissions, but that I can fix). Not providing a region for the client also didn't help, I specifically had to provide the USEast1 region. Apparently that region is the one that AWS treats as "Global", as you see "Global" selected as a region, when you are in the Personal Health Dashboard.