upload binary from api gateway to S3 bucket

前端 未结 2 1162
无人共我
无人共我 2021-01-16 05:45

i was trying to create a rest api which can take zip file as input (PUT requst) and store that on S3.

I\'m following the tutorial on http://docs.aws.amazon.com/apiga

相关标签:
2条回答
  • 2021-01-16 06:24

    It looks like you are attempting to put to the bucket named rest. Is that the correct bucket?

    This documentation will probably be a little more helpful for you: Integrating API with AWS S3

    In the example in used in the documentation, a bucket and object are provided in the path override for the PUT item method. These are mapped from the path params folder and item.

    Here is a helpful screenshot:

    0 讨论(0)
  • 2021-01-16 06:33

    If you want to upload the binary files like mp3,audio, documents etc..., you can add an entry with value multipart/form-data in the Binary support in AWS API Gateway settings and post/put the binary file using the header Content-Type = multipart/form-data from postman or api client. It should work..!!

    api gateway-binary support image

    0 讨论(0)
提交回复
热议问题