Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Use the AWS CLI to generate a token in Aurora DSQL - Amazon Aurora DSQL

Amazon Aurora DSQL is provided as a Preview service. To learn more, see Betas and Previews in the AWS Service Terms.

Amazon Aurora DSQL is provided as a Preview service. To learn more, see Betas and Previews in the AWS Service Terms.

Use the AWS CLI to generate a token in Aurora DSQL

Once your cluster is ACTIVE, you can generate an authentication token.

There are two ways to generate the token

  • If you are connecting as admin user, you use the generate-db-connect-admin-auth-token

  • If you are connecting with a custom database role, you use the generate-db-connect-auth-token

The following example uses the following attributes to generate an authentication token for the admin role.

  • your_cluster_endpoint – endpoint of the cluster. Follows the format your_cluster_identifier.dsql.AWS_REGION.on.aws

  • region – The AWS Region, such as us-east-2 or us-east-1

Linux and macOS
aws dsql generate-db-connect-admin-auth-token \ --region us-east-1 \ --expires-in 3600 \ --hostname <your_cluster_endpoint>
Windows
aws dsql generate-db-connect-admin-auth-token ^ --region=us-east-1 ^ --expires-in=3600 ^ --hostname=<your_cluster_endpoint>
aws dsql generate-db-connect-admin-auth-token \ --region us-east-1 \ --expires-in 3600 \ --hostname <your_cluster_endpoint>
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.