Skip to content

How to get S3 bucket region. #2623

Answered by sbiscigl
ShimYama asked this question in Q&A
Aug 10, 2023 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

this was fixed in 1.11.212 when we merged in customizations for express zonal one alongside other changes for re-invent last year. there are several important bug fixes related to it though so i would suggest picking up from HEAD. example code:

#include <aws/core/Aws.h>
#include <aws/core/utils/logging/LogLevel.h>
#include <aws/s3/S3Client.h>
#include <aws/s3/model/HeadBucketRequest.h>

using namespace Aws;
using namespace Aws::S3;
using namespace Aws::S3::Model;
using namespace Aws::Utils::Logging;

int main() {
    SDKOptions options;
    options.loggingOptions.logLevel = LogLevel::Debug;
    InitAPI(options);
    {
        S3Client client;
        const auto headBucket = client.HeadBucket

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ShimYama
Comment options

@fyse-nassar
Comment options

@sbiscigl
Comment options

Answer selected by ShimYama
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants