# API Gateway

## Creating an AWS API Gateway REST API

To create an AWS API Gateway using a REST API from the DuploCloud Portal, navigate to **Cloud Services** -> **Networking**, and click **Add** on the **Api Gateway** tab. The REST API generates security policies that make the API Gateway accessible to other resources (like Lambda functions) within the Tenant. After the REST API has been created in the DuploCloud Portal, all other configurations (e.g., defining methods and resources or pointing to lambda functions) should be done in the AWS Console. The console can be reached from the DuploCloud Portal by navigating to **Cloud Services** -> **Networking**, selecting the **Api Gateway** tab, and clicking the **Console** button under the **Actions** menu.

<figure><img src="/files/rkzlVYJU5DtV9lvASN5t" alt=""><figcaption><p>The <strong>Create an API Gateway pane</strong> showing integration of API Gateway and a lambda function</p></figcaption></figure>

## Enable local-development access to private AWS API Gateway instances

Make private AWS API Gateway instances (associated with VPC endpoints) accessible from your machines by constructing a URL, as shown below. Replace ***REST\_API\_ID*** with your API Gateway instance's unique identifier (API ID), ***VPCE\_ID*** with your VPC Endpoint ID (VPCE ID), ***REGION*** with the specified AWS region, and STAGE with the development stage (e.g., `prod`, `dev`, `test`).

\
`https://{`***`REST_API_ID`***`}-{`***`VPCE_ID`***`}.execute-api.{`***`REGION`***`}.amazonaws.com/{`***`STAGE`***`}`<br>

The resulting URL will point to the specific API Gateway instance associated with the API ID and VPC Endpoint ID in the specified AWS region and stage. With this URL, you can make requests over the default open VPN to the private API Gateway.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.duplocloud.com/docs/automation-platform/overview/aws-services/api-gateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
