Create a Lightsail database - Amazon Lightsail

Create a Lightsail database

Create a managed database in Amazon Lightsail in minutes. You can choose between the latest major versions of MySQL or PostgreSQL, and configure your database with a standard or high availability plan.

Note

For more information about managed databases in Lightsail, see Choose a database.

To create a database
  1. Sign in to the Lightsail console.

  2. On the Lightsail home page, choose the Databases tab.

  3. Choose Create database.

  4. Choose the AWS Region and Availability Zone for your database.

    1. Choose Change AWS Region and Availability Zone, then choose a Region.

    2. Choose Change your Availability Zone, then choose an Availability Zone.

  5. Choose your database type. Under one of the database engine options available, choose the drop-down menu, and then choose one of the latest major database versions supported by Lightsail.

    
          Pick a database engine in the Lightsail console.
  6. If necessary, choose one of these options:

    • Specify login credentials — Specify your own database user name and password. Otherwise, Lightsail specifies the user name, and creates a strong password for you.

      • To specify your own user name, choose Specify login credentials, and enter your user name into the text box. The following constraints apply according to the database engine you select:

        MySQL

        • Required for MySQL.

        • Must be 1 to 16 letters or numbers.

        • First character must be a letter.

        • Can't be a reserved word for the chosen database engine. For more information about reserved words in MySQL, see the Keywords and Reserved Words articles for MySQL 5.6, MySQL 5.7, or MySQL 8.0.

        PostgreSQL

        • Required for PostgreSQL.

        • Must be 1 to 63 letters or numbers.

        • First character must be a letter.

        • Can't be a reserved word for the chosen database engine. For more information about reserved words in PostgreSQL, see the SQL Key Words articles for PostgreSQL 9.6, PostgreSQL 10, PostgreSQL 11, or PostgreSQL 12.

      • To specify your own password, clear the Create a strong password for me check box, and enter your password into the text box. The password can include any printable ASCII character except "/", """, or "@". For MySQL databases, the password can contain from 8 to 41 characters. For PostgreSQL databases, the password can contain from 8 to 128 characters.

    • Specify the master database name — Specify your own primary database name, or Lightsail specifies the name for you. To specify your own primary database name, choose Specify the master database name, and enter a name into the text box. The following constraints apply according to the database engine you select:

      MySQL

      • Must contain 1 to 64 letters or numbers.

      • Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0-9).

      • Can't be a reserved word for the chosen database engine. For more information about reserved words in MySQL, see the Keywords and Reserved Words articles for MySQL 5.6, MySQL 5.7, or MySQL 8.0.

      PostgreSQL

      • Must contain 1 to 63 letters, numbers, or underscores.

      • Must begin with a letter. Subsequent characters can be letters, underscores, or digits (0-9).

      • Can't be a reserved word for the chosen database engine. For more information about reserved words in PostgreSQL, see the SQL Key Words articles for PostgreSQL 9.6, PostgreSQL 10, PostgreSQL 11, or PostgreSQL 12.

  7. Choose a high availability or a standard database plan.

    A database created with a high availability plan has a primary database and a secondary standby database in another Availability Zone for failover support. For more information, see High availability databases. Differently priced database bundle options are available, each with different levels of memory, processing, storage space, and transfer rates.

  8. Enter a name for your database.

    Resource names:

    • Must be unique within each AWS Region in your Lightsail account.

    • Must contain 2 to 255 characters.

    • Must start and end with an alphanumeric character or number.

    • Can include alphanumeric characters, numbers, periods, dashes, and underscores.

  9. Choose one of the following options to add tags to your database:

    • Add key-only tags or Edit key-only tags (if tags have already been added). Enter your new tag into the tag key text box, and press Enter. Choose Save when you’re done entering your tags to add them, or choose Cancel to not add them.

      
              Key-only tags in the Lightsail console.
    • Create a key-value tag, then enter a key into the Key text box, and a value into the Value text box. Choose Save when you’re done entering your tags, or choose Cancel to not add them.

      Key-value tags can only be added one at a time before saving. To add more than one key-value tag, repeat the previous steps.

      
              Key-value tags in the Lightsail console.
    Note

    For more information about key-only and key-value tags, see Tags.

  10. Choose Create database.

    Within minutes, your Lightsail database is ready. You can begin configuring it for data import, or connect to it by using a database client.

Next steps

Here are a few guides to help you manage your new database in Lightsail after it’s up and running: