HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/share/doc/awscli/examples/redshift/get-cluster-credentials.rst
**To get cluster credentials for an AWS account**

The following ``get-cluster-credentials`` example retrieves temporary credentials that enable access to an Amazon Redshift database. ::

    aws redshift get-cluster-credentials \
        --db-user adminuser --db-name dev \
        --cluster-identifier mycluster

Output::

    {
        "DbUser": "IAM:adminuser",
        "DbPassword": "AMAFUyyuros/QjxPTtgzcsuQsqzIasdzJEN04aCtWDzXx1O9d6UmpkBtvEeqFly/EXAMPLE==",
        "Expiration": "2019-12-10T17:25:05.770Z"
    }

For more information, see `Generating IAM Database Credentials Using the Amazon Redshift CLI or API <https://docs.aws.amazon.com/redshift/latest/mgmt/generating-iam-credentials-cli-api.html>`__ in the *Amazon Redshift Cluster Management Guide*.