Amazon Aurora
User Guide (API Version 2014-10-31)

Creating a Database Account

With IAM database authentication, you don't need to assign database passwords to the MySQL user accounts you create. Instead, authentication is handled by AWSAuthenticationPlugin—an AWS-provided plugin that works seamlessly with IAM to authenticate your IAM users.

To create a database account with MySQL, connect to the DB cluster and issue the CREATE USER statement, as shown in the following example.

CREATE USER jane_doe IDENTIFIED WITH AWSAuthenticationPlugin AS 'RDS';

The IDENTIFIED WITH clause allows MySQL to use the AWSAuthenticationPlugin to authenticate the database account (jane_doe). The AS 'RDS' clause refers to the authentication method, and the specified database account must have the same name as the IAM user or role. In this example, both the database account and the IAM user or role must be named jane_doe.


If you see the following message, it means that the AWS-provided plugin is not available for the current DB cluster.

ERROR 1524 (HY000): Plugin 'AWSAuthenticationPlugin' is not loaded

To troubleshoot this error, verify that you are using a supported configuration and that you have enabled IAM database authentication on your DB cluster. For more information, see Availability for IAM Database Authentication and Enabling and Disabling IAM Database Authentication.

After you create an account using AWSAuthenticationPlugin, you manage it in the same way as other database accounts. For example, you can modify account privileges with GRANT and REVOKE statements, or modify various account attributes with the ALTER USER statement.

If you remove an IAM user that is mapped to a database account, you should also remove the database account with the DROP USER statement.