linux
1.7.135
C++
When I tried to declare S3 client with the code
Aws::S3::S3Client s3_client();
It will fail and throw error
Segmentation fault (core dumped)
I confirmed that I have the correct credentials set up in ~/.aws/credentials and I can access to AWS S3 through terminal command:
aws s3 ls
I tried different version of SDK, they all have the same issue.
And I also have the same issue when try to initialize DynamoDB client through the command:
Aws::Client::ClientConfiguration clientConfig;
clientConfig.region = Aws::Region::US_EAST_1;
Aws::DynamoDB::DynamoDBClient dynamoClient(clientConfig);
It will also fail in the 3rd line.
Hi @sichao-uber , are you trying to run one of our code samples? If not can you provide a code snippet that replicates this issue?
And just kind of shooting in the dark here but, did you initialized the api?
Aws::InitAPI();
Hi, I am simply doing a test there, so my code is quite simple
void test()
{
Aws::Client::ClientConfiguration clientConfig;
clientConfig.region = Aws::Region::US_EAST_1;
Aws::DynamoDB::DynamoDBClient dynamoClient(clientConfig);
}
And you are right. After I added
Aws::SDKOptions options;
Aws::InitAPI(options);
It works now.
Most helpful comment
Hi @sichao-uber , are you trying to run one of our code samples? If not can you provide a code snippet that replicates this issue?
And just kind of shooting in the dark here but, did you initialized the api?
Aws::InitAPI();