To create upload service Api through Amazon API Gateway to upload files into Amazon Simple Storage Service (Amazon S3) . Steps to create an Api.
- Create an IAM role for API Gateway
- Create and attach an IAM policy to the API Gateway role
- Create an API Gateway REST API
- Create an API to serve your requests
- Create resources for your API
- Create a PUT method for your API
- Configure parameter mappings for the PUT method
- Set up Binary Media Types for the API
- Deploy your API
- Upload an image file to S3 by invoking your API
Reference: https://aws.amazon.com/premiumsupport/knowledge-center/api-gateway-upload-image-s3/