Create API Gateway
Create API Gateway
In this step, we will proceed to create a REST API on API Gateway to trigger Lambda events and forward requests to Lambda events.
- Access the API Gateway service management interface.
- Look for REST API and select Build.
- Under API name, enter S3 Upload, leave the rest as default.
- Click Create resource under the Resources section.
- In the Resource name field, enter upload.
- Click Create method.
- On the Create method page:
- Set Method type to POST.
- Enable Lambda proxy integration.
- Under Lambda function, select the s3-upload function you created earlier.
- Click Create method.
- From the left sidebar, select API settings.
- Under Binary media types, choose Manage media types.
- On the Manage binary media types page:
- Select Add binary media type and add:
- Click Save changes.
- From the left sidebar, select Resources.
- Under Stage, select *New stage*.
- Set Stage name to staging.
- Click Deploy.
- Copy the Invoke URL and proceed to the next step.