Amazon-SP-API-CSharp
Amazon-SP-API-CSharp copied to clipboard
Unknown Host Exception - sts.it.amazonaws.com on simple code
Hello Guys, i'm testing this library, with SampleCode project.
After correctly configured appsettings.json file entry with my key, id, secret, token, and any other setting, i tried to run a simple code:
ParameterOrderList serachOrderList = new ParameterOrderList(); serachOrderList.CreatedAfter = DateTime.UtcNow.AddMinutes(-600000); serachOrderList.OrderStatuses = new List<OrderStatuses>(); serachOrderList.OrderStatuses.Add(OrderStatuses.Canceled); var orders = amazonConnection.Orders.GetOrders(serachOrderList);
But i had an exception unhandled:
- System.Net.Http.HttpRequestException: 'Unknown Host. (sts.it.amazonaws.com:443)'
at this line:
response1 = await STSClient.AssumeRoleAsync(req, cancellationToken);
in SignWithSTSKeysAndSecurityTokenAsync() method, in [FikaAmazonAPI.Services] TokenGeneration class.
Please, can someone help me to investigate about this issue?
Thanks in advance.
Bye
GN
I'm investigate around exception: from here:
- https://docs.aws.amazon.com/general/latest/gr/sts.html
it looks like sts.it.amazonaws.com doesn't exist.
How is this determined?
Thanks
From this: https://github.com/abuzuhri/Amazon-SP-API-CSharp/issues/273#issuecomment-1207403111 i found "IT" in my AWS profile config.
Switched to "eu-south-1", code working now.
I will close this issue.
So does mean that library is dependent on the "/.aws/config/region" setting? If so, how am I going to configure the application in production? Who will create the /config file in /Users/.aws? [Locally, the AWS CLI installation will have created it]