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

234
Visualizações
AWS GetBucketLocationRequest with UseSignatureVersion4 option

How to request a bucket location with UseSignatureVersion4 global option? In fact, I need to create an instance of AmazonS3Client with a specified region endpoint. But, for example, if I have a bucket located in "us-west-2" region and create a default client AmazonS3Client with "us-east-1" region option, I get "The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-2'" error". But I do not know a bucket location in advance.

AWSConfigs.S3Config.UseSignatureVersion4 = true;
string location;

using (var tmpS3Client = new AmazonS3Client(accessInfo.AccessKey, accessInfo.SecretKey, RegionEndpoint.USEast1))
{
  var bucketLocationRequest = new GetBucketLocationRequest
  {
    BucketName = config.BucketName
  };
  GetBucketLocationResponse bucketLocationResponse = tmpS3Client.GetBucketLocation(bucketLocationRequest);
  location = bucketLocationResponse.Location.Value;
}
about 4 years ago · Santiago Trujillo
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