"Aws::MakeShared<Aws::FStream>" API of C++ SDK is failed when called mulitple times.

0

bool AwsDoc::S3::PutObjectAsync(const Aws::S3::S3Client &s3Client,
                                const Aws::String &bucketName,
                                const Aws::String &fileName) {
// ...

    const std::shared_ptr<Aws::IOStream> input_data =
            Aws::MakeShared<Aws::FStream>("SampleAllocationTag",
                                          fileName.c_str(),
                                          std::ios_base::in | std::ios_base::binary);

    if (!*input_data) {
        std::cerr << "Error: unable to open file " << fileName << std::endl;
        return false;
    }

// ...
}

ref: https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/cpp/example_code/s3/put_object_async.cpp

I want to upload about 1000 files (14GB) on S3 using PutObjectAsync of aws-sdk-cpp(https://github.com/aws/aws-sdk-cpp).

Creating std::shared_ptr<Aws::IOStream> instance is failed when I call PutObjectAsync multiple times without waiting PutObjectAsyncFinished callback.

200 ~ 300 files is OK, but more than that is not working. Memory usage is OK.

Why is Aws::MakeShared<Aws::FStream> not working?

질문됨 일 년 전87회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠