Table of Contents


This guide walks through downloading, installing, and starting Kong Gateway on Amazon Linux 2.


Start by downloading the following package specifically built for the Amazon Linux AMI:

Enterprise trial users should download their package from their welcome email and save their license to /etc/kong/license.json after step 1.

YUM Repositories

You can also install Kong via YUM; follow the instructions on the “Set Me Up” section on the page below.

NOTE: ensure that the baseurl field of the generated .repo file contains amazonlinux/amazonlinux; for instance:



  1. Install Kong

    If you are downloading the package, execute:

     $ sudo yum install /path/to/package.rpm --nogpgcheck

    If you are using the repository, execute:

     $ sudo yum update -y
     $ sudo yum install -y wget
     $ wget -O bintray-kong-kong-rpm.repo
     $ sed -i -e 's/baseurl.*/&\/amazonlinux\/amazonlinux'/ bintray-kong-kong-rpm.repo
     $ sudo mv bintray-kong-kong-rpm.repo /etc/yum.repos.d/
     $ sudo yum update -y
     $ sudo yum install -y kong
  2. Prepare your database or declarative configuration file

    Kong can run either with or without a database.

    When using a database, you will use the kong.conf configuration file for setting Kong’s configuration properties at start-up and the database as storage of all configured entities, such as the Routes and Services to which Kong proxies.

    When not using a database, you will use kong.conf its configuration properties and a kong.yml file for specifying the entities as a declarative configuration.

    Using a database

    Configure Kong so it can connect to your database. Kong supports both PostgreSQL 9.5+ and Cassandra 3.x.x as its datastore.

    If you are using Postgres, please provision a database and a user before starting Kong, i.e.:


    Now, run the Kong migrations:

     $ kong migrations bootstrap [-c /path/to/kong.conf]

    Note for Kong < 0.15: with Kong versions below 0.15 (up to 0.14), use the up sub-command instead of bootstrap. Also note that with Kong < 0.15, migrations should never be run concurrently; only one Kong node should be performing migrations at a time. This limitation is lifted for Kong 0.15, 1.0, and above.

    Without a database

    If you are going to run Kong in DB-less mode, you should start by generating declarative config file. The following command will generate a kong.yml file in your current folder. It contains instructions about how to populate it.

     $ kong config init

    After populating the kong.yml file, edit your kong.conf file. Set the database option to off and the declarative_config option to the path of your kong.yml file:

     database = off
     declarative_config = /path/to/kong.yml
  3. Start Kong

     $ kong start [-c /path/to/kong.conf]
  4. Use Kong

    Kong is running:

     $ curl -i http://localhost:8001/

    Quickly learn how to use Kong with the 5-minute Quickstart.

Get Updates!

Follow Up:

Get future release notes emailed to you.

Having Trouble? We're Here to Help!