Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

269
Visualizações
AWS SDK for .NET. The authorization mechanism you have provided is not supported

I received the next error while sending the ListObjectRequest:

The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256

According to this answer, AmazonS3Config was updated in the following way:

var amazonS3Config = new AmazonS3Config
{
    SignatureVersion = "4",
    ServiceURL = bucketName,
    RegionEndpoint = RegionEndpoint.USEast1,
    SignatureMethod = SigningAlgorithm.HmacSHA256
};

var s3Client = new AmazonS3Client(accessKeyID, secretKey, amazonS3Config);

But I still receive this error. What have I missed here?

Thanks.

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

Try to use the last version of amazonS3 sdk.I think ServiceUrl is not necessary when you know regionEndpoint, I used it with private cloud amazonS3 and When I do not know the Region Endpoint. I can retrieve the information from Amazon using the following code.

        var amazonS3Config = new AmazonS3Config();
        // region of FrankPurt is : RegionEndpoint.EUCentral1
        // according to amazonS3 Doc http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
        amazonS3Config.RegionEndpoint = RegionEndpoint.USEast1;

        var s3Client = new AmazonS3Client("your access key", "your secret key", amazonS3Config);
         S3DirectoryInfo dir = new S3DirectoryInfo(s3Client, "your bucket name", "your folder path without bucket name");
        Console.WriteLine(dir.GetFiles().Count());
over 4 years ago · Santiago Trujillo Relatório

0

By Using this I am able to work in EU west 2 region

            AmazonS3Config config = new AmazonS3Config();
            config.SignatureVersion = "4";
            config.RegionEndpoint = Amazon.RegionEndpoint.GetBySystemName("eu-west-2");
            config.SignatureMethod = Amazon.Runtime.SigningAlgorithm.HmacSHA256;

region should

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda