Skip to content

Can't provide AWSCredentials #637

Closed
Closed
@emustafa

Description

@emustafa

Hi,

I am having a weird issue which I am pretty sure I am doing something wrong because it is such a simple thing.

I am simply trying to download a file from s3 using AWSTransferManager. The file is protected so credentials has to be used.

I am creating the S3Client in the following way:

Aws::Client::ClientConfiguration config;
config.connectTimeoutMs = 15000;
config.requestTimeoutMs = 15000;
s3Client = new Aws::S3::S3Client(Aws::Auth::AWSCredentials("XXXXXXXXXXXXXXXXX", "YYYYYYYYYYYYYYYYYYYYY"), config);

Then I just create my TransferManager and all that and try to download file by giving its bucket name and key name. Then in the errorCallback that I set in Aws::Transfer::TransferManagerConfiguration I get the following message:

s3Erros.GetMessage() << " - " << s3Erros.GetErrorType()

prints out

No response body. Response code: 400 - 100

When I make the file public and provide empty credentials then the download works fine. But I can't seem to be able pass in credentials in the right way. I went over all the issues and documentation and I think I am using the api in the right way but it does not work for me. Any help is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    guidanceQuestion that needs advice or information.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions