Closed ZedZipDev closed 1 year ago
I tried to use
var ep = RegionEndpoint.GetBySystemName(_cloudConfig.Region);
//ep = "http://localhost:9229/";
_provider = new AmazonCognitoIdentityProviderClient( _cloudConfig.AccessKeyId, _cloudConfig.AccessSecretKey, "http://localhost:9229/");
but: Amazon.Runtime.AmazonClientException: 'No RegionEndpoint or ServiceURL configured'
Also:
SocketException: No such host is known.
System.Net.Sockets.Socket+AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
HttpRequestException: No such host is known. (cognito-idp.http:443)
Unfortunately I don't know anything about using the AWS C# SDKs, so I can't help you here.
At a guess:
local
, not an actual AWS region/
at the end of the endpoint URL, but I don't know if that would make any difference.answer is pretty simple (just in case someone else is looking):
new AmazonCognitoIdentityProviderConfig { ServiceURL = "http://localhost:9229" }
I have a sample c# code which works with real AWS Cognito. How should I change the code to run it with the Cognito emulator?
and the appsetting.json
Thanx