Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
upload binary from api gateway to S3 bucket

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/apigateway/latest/developerguide/api-gateway-content-encodings-examples-image-s3.html

I'm getting 500 error ad the cloudwatch logs are as follows

Verifying Usage Plan for request: c2140431-1a10-11e7-9f32-0df3853848fe. API Key: API Stage: xjjd186a30/rd

API Key authorized because method 'PUT /s3' does not require API Key.

Request will not contribute to throttle or quota limits

Usage Plan check succeeded for API Key and API Stage xjjd186a30/rd

Starting execution for request: c2140431-1a10-11e7-9f32-0df3853848fe

HTTP Method: PUT, Resource Path: /s3

Successfully completed execution

Method completed with status: 500

enter image description here

when i try the api from post man i get

AccessDeniedAccess DeniedF55D45C185A5BF11HXopfmxAxGNvmdi7PRp4c1j/wPYmGVTrkKbGXfZwofLOn7TRBPs3uFjer/2UCIktynKtGeNU1Xw=

my roles i have given AmazonS3FullAccess permission and have assigned the role to api gateway settings and the integration request.

can anyone help please

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

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: enter image description here

about 4 years ago · Santiago Trujillo Report

0

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

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!