dotnet
dotnet copied to clipboard
.Net 8 Blazor Webassembly does not work with Dynamodb
A simple scan request in Blazor Webassembly .Net 8 gets an exception. The identical code works in .Net 6 Core.
public static async Task<string> ScanRequest()
{
IAmazonDynamoDB _ddbClient = new AmazonDynamoDBClient(aws_access_key, aws_secret_key, RegionEndpoint.USEast1);
var request = new ScanRequest
{
TableName = "mytable",
Limit = 10
};
try
{
var response = await _ddbClient.ScanAsync(request);
}
catch (Exception ex)
{
var msg = ex.Message;
}
return "done";
}
Create client succeeds, but the ScanAsync gives 'The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details.'