I need to call the AWS Gateway API service, which is protected by AWS_IAM.
I want to use HttpClient, as it is recommended by Microsoft.
I found some code examples using other methods. I also found the official AWS SDK that uses their internal IRequest. I am currently writing an implementation of IRequest, so I can use Amazon.Runtime.Internal.Auth.AWS4Signer.SignRequest. But it seems incredibly hacked!
What I really want is what will take mine HttpClientand then inserts the headers Host, X-Amz-Content-SHA256, X-Amz-Date and Authorization.
I find it hard to believe that the library is no longer ready for use.
Please note that this seems like this question, but it is a bit old, and I would hope that it would be easier now. Is there a .NET library that can sign an AWS V4 signed request?
Update 2018-03-21 - now there is a NuGet package https://www.nuget.org/packages/Aws4RequestSigner/
My colleague used this and reports that it works well! I hope this helps anyone who comes to this point.
source
share