Upload File To S3 With Only Api Gateway

Ufuk Dag
2 min readDec 3, 2020

Today, I want to create a serverless architecture to upload a file or something else to AWS S3 without writing any line of code.

If you are trying to upload an invoice, a picture, or other things to AWS S3 and when you google it, you will see API Gateway and AWS Lambda integration to succeed. But if you don’t control any business logic in the Lambda function, It’s not a suitable solution.

First, you need to create an AWS API Gateway and choose Rest API integration to use other AWS Services (in this case S3).

Now give a name for your Api Gateway and create it.

Create a new resource and give it a name for example “save”.

Create a new Put method and choose AWS services at left side. Choose your region and select S3 for the service. If you want to add some prefix to your object, add parameters using brackets.

Add your parameters in the Request Method.

Add your parameters also in the Integration Request.

That’s it. You are ready yo use your endpoint. You can add your parameters into request and save your objects directly into S3.

--

--

Ufuk Dag

Founder @Plugger.ai, ex-Getir, ex-Insider. Productivity researcher.