Table of Contents

Namespace Codebelt.Extensions.AwsSignature4

When your ASP.NET Core application needs to sign HTTP requests for AWS services using Signature Version 4, this namespace provides a fluent builder pattern and extension methods that simplify AWS4-HMAC-SHA256 authentication. Use Aws4HmacAuthorizationHeaderBuilder to construct complete authorization headers from request data and credentials, or use the DateTime extension methods to format timestamps in AWS's required date formats.

Availability: .NET 10 and .NET 9

Start Here

For building new authorization headers: Start with Aws4HmacAuthorizationHeaderBuilder, which provides a fluent interface to construct complete AWS Signature Version 4 authorization headers from your HTTP request and AWS credentials.

For parsing existing headers: Use Aws4HmacAuthorizationHeader.Create to validate and parse an existing authorization header string.

For date/time formatting: Use the DateTime extension methods ToAwsDateString and ToAwsDateTimeString to format request timestamps in the formats required by AWS Signature Version 4.

Extension Members

Type Ext Methods
DateTime ⬇️ ToAwsDateString, ToAwsDateTimeString

Classes

Aws4HmacAuthorizationHeader

Provides a representation of a HTTP AWS4-HMAC-SHA256 Authentication header.

Aws4HmacAuthorizationHeaderBuilder

Provides a way to fluently represent a HTTP AWS4-HMAC-SHA256 Authentication header.

Aws4HmacFields

A collection of constants for Aws4HmacAuthorizationHeaderBuilder and related.

DateTimeExtensions

Extension methods for the DateTime struct.