Is there a .NET library that can sign a request using an AWS V4 subscription?

I have an API gateway where I set authentication to use AWS_IAM. This requires me to sign each request with an AWS V4 signature and attach the HMAC in the header. I found libraries for signing a request with a V4 signature in nodejs. But I can’t find a library to sign me up. Even aws-sdk for .NET has this abstracted for its specific use case. Is there a library there (I did a quick Google search and didn't find any results)? Or do I need to write hmac myself?

+4
source share
1 answer

you can read how the signature is made, and you can (if you want). I would recommend pulling into the AWS SDK for .NET and using the functionality from the SDK to actually sign.

Here the signer forms the SDK:

https://github.com/aws/aws-sdk-net/blob/6c3be79bdafd5bfff1ab0bf5fec17abc66c7b516/sdk/src/Core/Amazon.Runtime/Internal/Auth/AWS4Signer.cs

You may need to adapt it (i.e. it knows about AWS services and endpoints by default)

+5
source

All Articles