Deploying an API

Stay on top of your API deployments in Postman by connecting to Amazon API Gateway. Once connected to API Gateway, you can view your API deployment status and history from within Postman. This integration supports OpenAPI 3.0 schemas for both HTTP and REST APIs.

For HTTP APIs, you can also choose to export your schema from Postman to Amazon API Gateway. You can then use the AWS console to deploy your exported schema to a stage. Alternatively, you can deploy your HTTP API schema directly from Postman to a stage in API Gateway.

Connecting to Amazon API Gateway

To connect to Amazon API Gateway in Postman, select APIs in the left sidebar, and then select the API and version you want to connect. Select the Deployments tab, and then select AWS API Gateway.

Connecting to AWS API Gateway

When setting up the connection to API Gateway, you can choose to authenticate by creating an AWS IAM role or by using an AWS access key. Follow the steps for your chosen method below.

Authenticating with an AWS IAM role

To set up a connection to Amazon API Gateway using an AWS IAM role, select IAM under AWS Authentication Mechanism.

Connecting with AWS IAM role

Enter a Nickname for this integration and select the AWS API Type (HTTP or REST).

Next, create an IAM role for Postman in AWS:

  1. Navigate to the AWS IAM console and select Create role.

  2. Under Select type of trusted entity, select Another AWS account.

  3. Enter Postman's AWS Account ID: 258201882842

  4. Under options, select the check box to Require external ID and enter the External ID from Postman. You can find the external ID under Step 1: Create an IAM role.

    For more information, refer to the AWS IAM guide on using external IDs.

  5. Select Next: Permissions.

  6. Select an existing IAM policy or select Create policy. If you are creating a policy, use the following JSON:

    {
        "Version": "2012-10-17",
        "Statement": [
            {
                "Sid": "Stmt909923626743",
                "Effect": "Allow",
                "Action": [
                    "apigateway:GET"
                ],
                "Resource": [
                    "*"
                ]
            }
        ]
    }
  7. Select Next: Tags.

  8. Select Next: Review.

  9. Add a Role name and Role description, then select Create role.

Copy the Role ARN from AWS and paste it in Postman under Step 2: Enter role ARN and region. Next, enter the AWS Region where the API Gateway is located and select the API Gateway. When you're ready, select Connect.

Authenticating with an AWS access key

To set up a connection to Amazon API Gateway using an AWS access key, select Access Key under AWS Authentication Mechanism.

Connecting with AWS access key

Next, enter information about the connection:

  • Enter a Nickname for this integration.
  • Select the AWS API Type (HTTP or REST).
  • Enter the Access Key ID and Secret Access Key for your AWS account. (Learn how to find your credentials in AWS.)
  • Enter the AWS Region where the API Gateway is located and select the API Gateway.

When you're ready, select Connect.

Viewing API deployments in Postman

After connecting to Amazon API Gateway, you can view the export and deployment history for your API schemas in Postman. Select APIs in the left sidebar, select an API and version, and then select the Deployments tab.

  • For each stage you can view the active deployment, the creation date, and the date last updated. Select a stage to view additional details, including the invoke URL and stage description (from AWS).
  • For each export from Postman, you can view the source of the export and the time when exported.
  • For each deployment you can view the ID, description, and creation date.
Viewing API deployments

From the Deployments tab, you can take the following actions:

  • To view your API Gateway in AWS, select the AWS Gateway ID.
  • To export or deploy your schema, select Deploy API (for HTTP API schemas only). Learn more about deploying your API.
  • To view metrics for your API Gateway in AWS, select View Dashboard.
  • To see the latest deployment status, select the refresh icon Refresh icon.
  • To edit or delete the connection to Amazon API Gateway, select the three dots Three dots icon.

Exporting and deploying your API

Exporting an HTTP API schema makes it available in the connected Amazon API Gateway. After you export a schema from Postman, use the AWS console to configure and deploy the schema to a stage in API Gateway. Alternatively, when exporting, you can choose to deploy the schema directly from Postman to a stage in the connected API Gateway. Once the schema is deployed, users can start calling the API.

Only HTTP API schemas can be exported and deployed from Postman. To deploy a REST API schema, use the AWS console.

  1. Open your API by selecting APIs in the left sidebar, and then selecting an API and a version.

  2. Select the Deployments tab, and then select Deploy API.

    You can also export and deploy your API from the Changelog. Open the Changelog Changelog icon in the right context bar, select the three dots Three dots icon next to a release, and then select Deploy Schema.

  3. Select the version, branch, or release to deploy. Learn more about versioning an API and creating a release.

  4. (Optional) If you would like to immediately deploy the schema to a stage after exporting, select Deploy on a stage. Select the AWS stage to deploy the schema to, and enter a brief description.

    To deploy your schema, your gateway must have at least one route with a configured integration.

  5. Select Deploy.

Deploying an API

API Gateway extensions to Open API (vendor extensions) are preserved when pushing and deploying a schema from Postman. Postman merges any extensions present in the API Gateway into the schema before pushing the merged schema to the API Gateway.

Last modified: 2022/01/21