API Gateway Configuration

Set up HTTP API routes to expose Lambda functions as REST endpoints for uploading and deleting files.

Amazon API Gateway acts as the bridge between your ownCloud setup (or Postman for testing) and the backend AWS Lambda functions. It allows secure and scalable HTTP access to your upload and delete endpoints.

In this chapter, you'll create and configure routes to trigger your uploadFileLambda and deleteFileLambda functions.

Why API Gateway?

  • Connect HTTP requests to serverless functions

  • Secure your endpoints with fine-grained IAM or API keys

  • Easily test with Postman, curl, or ownCloud

Step 1: Connect to API Gateway

  1. Go to API Gateway → Create API

  2. Choose HTTP API or REST API

  3. Name the API as: owncloud-dedup-api


Step 2: Create API Routes

  1. Click on API name.

  2. In the left navigation pane, click on routes.

  3. Click on Create.

  4. Select POST method from the drop-down and name it as: dedup

  1. Select DELETE method from the drop-down and name it as: delete

  1. In the left navigation pane, go to Integrations.

  2. Add two routes:

  • POST /dedup → linked to owncloud-dedup-function

  • POST /delete → linked to deleteFileLambda

  1. Deploy the API.


Last updated