0

Is there a straightforward tutorial explaining writing files to generic S3 bucket using C? All I can find is C++ and C#, neither of which I'm familiar with, and I need to get this project written too quickly for me to learn C++ or C#.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Jim C
  • 165
  • 8
  • 2
    no nice way of doing it in C. you can try and look through this for doing it in C but you'd have to teach yourself how everything in their package works together. https://github.com/awslabs/aws-c-common. https://stackoverflow.com/questions/51731391/c-language-wrapper-for-aws-sdk-c – smcrowley Jul 07 '22 at 00:19
  • if speed's the goal, do it in python. https://medium.com/bilesanmiahmad/how-to-upload-a-file-to-amazon-s3-in-python-68757a1867c6. if it has to be done within the context of running C code, you can make the python script work with sys args and pass them in via the C code calling it. https://www.linuxjournal.com/article/8497 – smcrowley Jul 07 '22 at 00:23
  • Thanks for the aws-c-common suggestion. It seems odd to me that they'd write all the underlying stuff in C, then have various well-documented SDKs for other languages but not bother to write up how to use the C functions directly. I don't know Python, either, sadly, so that's a non-starter. – Jim C Jul 07 '22 at 01:02
  • if you know c, doing just this in python should be straight forward. Install any minor version of python3 and copy paste from the tutorial linked. you'll only need to make 4 changes. the location of the file being uploaded, the location in the bucket it should be stored, and the keys used to authorize access to the bucket – smcrowley Jul 07 '22 at 17:58

0 Answers0