Closed
Description
Describe the bug
My ASP.NET core app runs on an EC2 instance. No specific credentials are provided in the configuration.
After updating the AWS SDK from v3 to v4, I get the following error when the app tries to upload an object to S3:
Amazon.S3.AmazonS3Exception: The request signature we calculated does not match the signature you provided. Check your key and signing method.
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
It should work like it did previously.
Current Behavior
Object upload to S3 fails.
Reproduction Steps
Service configuration in Startup.cs looks like this:
services.AddDefaultAWSOptions(Configuration.GetAWSOptions());
services.AddAWSService<IAmazonS3>();
Configuration section in appsettings.json looks like this:
"AWS": {
"Region": "us-east-2"
},
Possible Solution
No response
Additional Information/Context
No code was changed.
No permissions were changed.
EC2 Instance role is the same.
AWS .NET SDK and/or Package version used
Previous package versions:
<PackageReference Include="AWS.Logger.AspNetCore" Version="3.3.0" />
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="3.7.2" />
<PackageReference Include="AWSSDK.S3" Version="3.7.101.21" />
New package versions (where the error occurs):
<PackageReference Include="AWS.Logger.AspNetCore" Version="4.0.0" />
<PackageReference Include="AWSSDK.Extensions.NETCore.Setup" Version="4.0.0" />
<PackageReference Include="AWSSDK.S3" Version="4.0.0.4" />
Targeted .NET Platform
.NET 9
Operating System and version
64bit Amazon Linux 2023 v3.4.1 running .NET 9