Amazon Redshift Federated Query with RDS PostgreSQL

   Go back to the Task List

  « 5. Configure Redshift Role    7. Federate PostgreSQL Database »

6. Launch Redshift Cluster

You launch a Redshift cluster which used to access PostgreSQL database using fedration.

  1. Goto Redshift Management Console and click on the Create cluster button.

    Redshift Spectrum

  2. On the next screen, type in dojoredshift for the cluster identifier and select Free trial option.

    Redshift Spectrum

  3. On the same screen, in the Database configurations section, type in Password1! for the master user password field. Keep rest of the fields as the default.

    Redshift Spectrum

  4. On the same screen, expand Cluster permissions (optional) section. Select dojoredshiftrole as the IAM Role and click on the Add IAM Role button (please make sure you click this button to add the role to the cluster). Finally click on the Create cluster in the bottom of the screen.

    Redshift Spectrum

  5. It will take a moment to create the Redshift cluster. Wait till the status of the cluster changes to Available.

    Redshift Spectrum

  6. Few things to remember about the cluster which will be useful later.

    cluster identifier: dojoredshift

    username: awsuser

    password: Password1!

    database: dev

  7. The cluster is ready. You create a table and insert data in the table in the Redshift cluster database. In the Redshift Management Console, click on the EDITOR menu in the left. It will open the Connect to database popup. Select Create new connection option. Select dojoredshift as the cluster. Type in dev for the database. Type in awsuser for the user and Password1! for the password. Finally click on the Connect to database button to connect to the cluster.

    Redshift Query

  8. On the next screen, run the following SQL statements one by one to create payments table and then insert some sample data into it.

    Redshift

    CREATE TABLE payments (
      customerNumber int,
      checkNumber varchar(50),
      paymentDate date,
      amount decimal);
    

    `

    Redshift

    insert  into payments(customerNumber,checkNumber,paymentDate,amount) values 
    (103,'HQ336336','2004-10-19','6066.78'),
    (103,'JM555205','2003-06-05','14571.44'),
    (103,'OM314933','2004-12-18','1676.14'),
    (112,'BO864823','2004-12-17','14191.12'),
    (112,'HQ55022','2003-06-06','32641.98'),
    (112,'ND748579','2004-08-20','33347.88'),
    (114,'GG31455','2003-05-20','45864.03'),
    (114,'MA765515','2004-12-15','82261.22'),
    (114,'NP603840','2003-05-31','7565.08');
    

    `

  9. This Redshift database table and data is ready. Let’s configure federated access to PostgreSQL database from the Redshift cluster.