我正在尝试使用,但没有成功。
首先,我尝试使用python和boto3 upload_file
函数上传文件,这是成功的。现在,由于嵌入式C SDK需要预先签名的URL(BOTO3没有),因此我修改了Python脚本不调用 upload_file
,但仅在屏幕上打印AWS凭据和键。
然后,我使用这些凭据,放入〜/.aws/凭据,并使用embedded-c sdk的presigned_urls_gen.py脚本生成预先签名的URL。
当我运行演示时,我总是会遇到错误:
您提供的AWS访问密钥ID在我们的记录中不存在。
当我添加一些调试时,我看到boto3做的事情与嵌入式C SDK中的上传示例完全不同。嵌入式C SDK中的示例甚至都不使用SIGV4签名或在请求中添加安全标头。
在嵌入式C SDK与boto3中,相同的上传过程是如此之不同?
I am trying to upload a file to an AWS S3 private bucket using aws-iot-device-sdk-embedded-c, but without success.
First I tried upload a file using python and boto3 upload_file
function, this was successful. Now because the embedded-C sdk requires a pre-signed URL's (boto3 doesn't) I have modified the python script not to call upload_file
but only print the aws credentials and key to the screen.
Then I take these credentials, put in ~/.aws/credentials and generate a pre-signed URL using the presigned_urls_gen.py script of embedded-C sdk.
When I run the demo I am always getting the error:
The AWS Access Key Id you provided does not exist in our records.
When I added some debug I saw that boto3 is doing something completly different then the upload example in embedded-C sdk. The example in embedded-C sdk is not even using sigv4 to sign anything or add security headers to the request.
How come the same upload procedure is so different in embedded-C sdk versus the boto3?
发布评论