I tried compiling the source code you gave as an example on your blog -- the putObject and getObject request.
I got the following error while running:
upret: /home/lex/Documents/aws-sdk-cpp/aws-cpp-sdk-core/source/http/HttpClientFactory.cpp:136: std::shared_ptr<Aws::Http::HttpClient> Aws::Http::CreateHttpClient(const Aws::Client::ClientConfiguration&): Assertion `s_HttpClientFactory' failed.
Aborted (core dumped)
Do you have any idea as to why? I changed the access key and secret key to match the ones I created. Would appreciate any help. I built it on a Linux Ubuntu 14.04. THanks!
It doesn't look like you called Aws::InitAPI()
On Tue, Jul 12, 2016 at 9:32 AM, Lekan [email protected] wrote:
I tried compiling the source code you gave as an example on your blog
https://aws.amazon.com/blogs/developer/category/cpp/ -- the putObject
and getObject request.I got the following error while running:
upret: /home/lex/Documents/aws-sdk-cpp/aws-cpp-sdk-core/source/http/HttpClientFactory.cpp:136: std::shared_ptrAws::Http::HttpClient Aws::Http::CreateHttpClient(const Aws::Client::ClientConfiguration&): Assertion `s_HttpClientFactory' failed.Aborted (core dumped)
Do you have any idea as to why? I changed the access key and secret key to
match the ones I created. Would appreciate any help. I built it on a Linux
Ubuntu 14.04. THanks!—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/aws/aws-sdk-cpp/issues/234, or mute the thread
https://github.com/notifications/unsubscribe/ADvpxS-U0Iq6ZZvtgmpPp5chfbF9TxHFks5qU8GjgaJpZM4JKkl4
.
"The poet only asks to get his head into the heavens. It is the logician
who seeks to get the heavens into his head. And it is his head that splits"
--G. K. Chesterton-- "Orthodoxy"
Thank you very much indeed. I noticed the putObjectRequest and getObjectRequest do not have an API for specifying the secret keys. After I included the Aws::InitApi, I got an access denied error:
Error while putting Object AccessDenied Access Denied
Error while getting object AccessDenied Access Denied
Segmentation fault (core dumped)
You either setup the default credentials provider chain, which is the $HOME/.aws/credentials file, environment variables, or the ec2 instance metadata service on ec2, or you pass your own credentials provider to the S3Client constructor. See the Readme.md file for more details.
So it seems to be downloading the yaml file in the bucket I set up. For some reason, it could not put new objects.
I end up with an error of the form:
Error while putting Object InvalidArgument Unable to parse ExceptionName: InvalidArgument Message: Argument format not recognized
Successfully retrieved object from s3 with value:
<?xml version="1.0" encoding="UTF-8"?>
<ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><Name>amazonrobotics.aws.lekan</Name><Prefix></Prefix><Marker></Marker><MaxKeys>1000</MaxKeys><IsTruncated>false</IsTruncated><Contents><Key>myroom2.yaml</Key><LastModified>2016-07-12T22:32:11.000Z</LastModified><ETag>"2b592f9b4b40b790f08b412307866254"</ETag><Size>137</Size><Owner><ID>d413998d4a4fd6c37a7644b58620e0b31307a1e0b0534aaee026194026d4151c</ID><DisplayName>patlekano</DisplayName></Owner><StorageClass>STANDARD</StorageClass></Contents></ListBucketResult>
Glad it gets files at least. Now onto correcvtly parsing the XML that is requested. Sheesh!