Skip to content

AnonymousAWSCredentials do not support this operation #3696

Closed
@zlistiev

Description

@zlistiev

Describe the bug

After upgrading AWSSDK.S3 to the latest version (3.7.415.13) it triggers exception "AnonymousAWSCredentials do not support this operation" when uploading to S3 bucket. Was fine at version 3.7.305.31.

var credentails = new AnonymousAWSCredentials();
_client = new AmazonS3ClientWrapper(new AmazonS3Client(credentails, region));

await _client.PutObjectAsync(new PutObjectRequest
{
				BucketName = bucketName,
				Key = s3Key,
				FilePath = file?.FilePath,
				CannedACL = somecannedacl
});

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

Object should be successfully uploaded using anonymous credentials

Current Behavior

PutObjectAsync throws "AnonymousAWSCredentials do not support this operation" exception when trying to upload object using anonymous credentials

Reproduction Steps

var credentails = new AnonymousAWSCredentials();
_client = new AmazonS3ClientWrapper(new AmazonS3Client(credentails, region));

await _client.PutObjectAsync(new PutObjectRequest
{
				BucketName = bucketName,
				Key = s3Key,
				FilePath = file?.FilePath,
				CannedACL = somecannedacl
});

Possible Solution

No response

Additional Information/Context

No response

AWS .NET SDK and/or Package version used

AWSSDK.S3 3.7.415.13

Targeted .NET Platform

.NET Framework 4.7.2

Operating System and version

Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.potential-regressionMarking this issue as a potential regression to be checked by team members3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions