Amazon Redshift Getting Started Guide

Amazon Redshift
Getting Started Guide
API Version 2012-12-01
Amazon Redshift Getting Started Guide
Amazon Redshift: Getting Started Guide
Copyright © 2015 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.
The following are trademarks of Amazon Web Services, Inc.: Amazon, Amazon Web Services Design, AWS, Amazon CloudFront,
AWS CloudTrail, AWS CodeDeploy, Amazon Cognito, Amazon DevPay, DynamoDB, ElastiCache, Amazon EC2, Amazon Elastic
Compute Cloud, Amazon Glacier, Amazon Kinesis, Kindle, Kindle Fire, AWS Marketplace Design, Mechanical Turk, Amazon Redshift,
Amazon Route 53, Amazon S3, Amazon VPC, and Amazon WorkDocs. In addition, Amazon.com graphics, logos, page headers,
button icons, scripts, and service names are trademarks, or trade dress of Amazon in the U.S. and/or other countries. Amazon's
trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is
likely to cause confusion among customers, or in any manner that disparages or discredits Amazon.
All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected
to, or sponsored by Amazon.
Amazon Redshift Getting Started Guide
Table of Contents
Getting Started ............................................................................................................................. 1
Step 1: Set Up Prerequisites .................................................................................................... 2
Sign Up for AWS ........................................................................................................... 2
Install SQL Client Drivers and Tools .................................................................................. 2
Determine Firewall Rules ................................................................................................ 3
Step 2: Launch a Cluster ........................................................................................................ 3
To Launch an Amazon Redshift Cluster ............................................................................. 3
Step 3: Authorize Cluster Access .............................................................................................. 8
To Configure the VPC Security Group ............................................................................... 8
To Configure the Amazon Redshift Security Group .............................................................. 9
Step 4: Connect to the Cluster ............................................................................................... 10
To Get Your Connection String ....................................................................................... 11
To Connect from SQL Workbench/J to Your Cluster ............................................................ 11
Step 5: Load Sample Data from Amazon S3 ............................................................................. 13
Step 6: Find Additional Resources and Reset Your Environment ................................................... 17
Where Do I Go From Here? ........................................................................................... 17
Document History ........................................................................................................................ 21
API Version 2012-12-01
iii
Amazon Redshift Getting Started Guide
Getting Started with Amazon
Redshift
Welcome to the Amazon Redshift Getting Started. Amazon Redshift is a fully managed, petabyte-scale
data warehouse service in the cloud. An Amazon Redshift data warehouse is a collection of computing
resources called nodes, which are organized into a group called a cluster. Each cluster runs an Amazon
Redshift engine and contains one or more databases.
If you are a first-time user of Amazon Redshift, we recommend that you begin by reading the following
sections:
• Amazon Redshift Management Overview – This topic provides an overview of Amazon Redshift.
• Service Highlights and Pricing – This product detail page provides the Amazon Redshift value proposition,
service highlights, and pricing.
• Amazon Redshift Getting Started (this guide) – This guide provides a tutorial of using Amazon Redshift
to create a sample cluster and work with sample data.
This guide is a tutorial designed to walk you through the process of creating a sample Amazon Redshift
cluster. You can use this sample cluster to evaluate the Amazon Redshift service. In this tutorial, you’ll
perform the following steps:
• Step 1: Set Up Prerequisites (p. 2)
• Step 2: Launch a Sample Amazon Redshift Cluster (p. 3)
• Step 3: Authorize Access to the Cluster (p. 8)
• Step 4: Connect to the Sample Cluster (p. 10)
• Step 5: Load Sample Data from Amazon S3 (p. 13)
• Step 6: Find Additional Resources and Reset Your Environment (p. 17)
After you complete this tutorial, you can find more information about Amazon Redshift and next steps in
Where Do I Go From Here? (p. 17)
Important
The sample cluster that you create will be running in a live environment. The on-demand rate is
$0.25 per hour for using the sample cluster that is designed in this tutorial until you delete it. For
more pricing information, go to the Amazon Redshift pricing page. If you have questions or get
stuck, you can reach out to the Amazon Redshift team by posting on our Discussion Forum.
API Version 2012-12-01
1
Amazon Redshift Getting Started Guide
Step 1: Set Up Prerequisites
This tutorial is not meant for production environments, and does not discuss options in depth. After you
complete the steps in this tutorial, you can use the Additional Resources (p. 17) section to locate more
in-depth information to plan, deploy, and maintain your clusters, and to work with the data in your data
warehouse.
Step 1: Set Up Prerequisites
Before you begin setting up an Amazon Redshift cluster, make sure that you complete the following
prerequisites in this section:
• Sign Up for AWS (p. 2)
• Install SQL Client Drivers and Tools (p. 2)
• Determine Firewall Rules (p. 3)
Sign Up for AWS
If you don’t already have an AWS account, you must sign up for one. If you already have an account,
you can skip this prerequisite and use your existing account.
1.
2.
Open http://aws.amazon.com/, and then click Sign Up.
Follow the on-screen instructions.
Part of the sign-up procedure involves receiving a phone call and entering a PIN using the phone
keypad.
Install SQL Client Drivers and Tools
You can use most SQL client tools with Amazon Redshift JDBC or ODBC drivers to connect to an Amazon
Redshift cluster. In this tutorial, we show you how to connect using SQL Workbench/J, a free,
DBMS-independent, cross-platform SQL query tool. If you plan to use SQL Workbench/J to complete this
tutorial, follow the steps below to get set up with the Amazon Redshift JDBC driver and SQL Workbench/J.
For more complete instructions for installing SQL Workbench/J, go to Setting Up the SQL Workbench/J
Client in the Amazon Redshift Cluster Management Guide. If you use an Amazon EC2 instance as your
client computer, you will need to install SQL Workbench/J and the required drivers on the instance.
Note
You must install any third-party database tools that you want to use with your clusters; Amazon
Redshift does not provide or install any third-party tools or libraries.
To Install SQL Workbench/J on Your Client Computer
1.
2.
Go to the SQL Workbench/J website and download the appropriate package for your operating
system.
Go to the Installing and starting SQL Workbench/J page and install SQL Workbench/J.
Important
Note the Java runtime version prerequisites for SQL Workbench/J and ensure you are using
that version, otherwise, this client application will not run.
3.
Go to Configure a JDBC Connection and download an Amazon Redshift JDBC driver to enable SQL
Workbench/J to connect to your cluster.
API Version 2012-12-01
2
Amazon Redshift Getting Started Guide
Determine Firewall Rules
For more information about using the Amazon Redshift JDBC or ODBC drivers, see Configuring
Connections in Amazon Redshift.
Determine Firewall Rules
As part of this tutorial, you will specify a port when you launch your Amazon Redshift cluster. You will
also create an inbound ingress rule in a security group to allow access through the port to your cluster.
If your client computer is behind a firewall, you need to know an open port that you can use so you can
connect to the cluster from a SQL client tool and run queries. If you do not know this, you should work
with someone who understands your network firewall rules to determine an open port in your firewall.
Though Amazon Redshift uses port 5439 by default, the connection will not work if that port is not open
in your firewall. Because you cannot change the port number for your Amazon Redshift cluster after it is
created, make sure that you specify an open port that will work in your environment during the launch
process.
Step 2: Launch a Sample Amazon Redshift
Cluster
Now that you have the prerequisites completed, you can launch your Amazon Redshift cluster.
Important
The cluster that you are about to launch will be live (and not running in a sandbox). You
will incur the standard Amazon Redshift usage fees for the cluster until you delete it. If
you complete the tutorial described here in one sitting and delete the cluster when you are
finished, the total charges will be minimal.
To Launch an Amazon Redshift Cluster
1.
Sign in to the AWS Management Console and open the Amazon Redshift console at https://
console.aws.amazon.com/redshift/.
Important
If you use IAM user credentials, ensure that the user has the necessary permissions to
perform the cluster operations. For more information, go to Controlling Access to IAM Users
in the Amazon Redshift Management Guide.
2.
In the main menu, select the region in which you want to create the cluster. For the purposes of this
tutorial, select US West (Oregon).
API Version 2012-12-01
3
Amazon Redshift Getting Started Guide
To Launch an Amazon Redshift Cluster
3.
In the left navigation pane, click Clusters and then click Launch Cluster.
If you have no clusters in your selected region, your console will look similar to the following:
If you have already launched a cluster in your selected region, your console will look similar to the
following:
4.
On the Cluster Details page, enter the following values and then click Continue:
• Cluster Identifier: type examplecluster.
• Database Name: leave this box blank. Amazon Redshift will create a default database named
dev.
• Database Port: type the port number on which the database will accept connections. You should
have determined the port number in the prerequisite step of this tutorial. You cannot change the
port after launching the cluster, so make sure that you have an open port number in your firewall
so that you can connect from SQL client tools to the database in the cluster.
• Master User Name: type masteruser. You will use this username and password to connect to
your database after the cluster is available.
• Master User Password and Confirm Password: type a password for the master user account.
API Version 2012-12-01
4
Amazon Redshift Getting Started Guide
To Launch an Amazon Redshift Cluster
5.
On the Node Configuration page, select the following values and then click Continue:
• Node Type: dw2.large
• Cluster Type: Single Node
6.
On the Additional Configuration page, you will see different options depending on your AWS account,
which determines the type of platform the cluster uses. To keep things simple for this tutorial, you
do not need to understand the distinction between these platforms, EC2-Classic and EC2-VPC. You
can use the information in Additional Resources (p. 17) to locate the Amazon Redshift Cluster
Management Guide and learn more after the tutorial.
EC2-VPC
If you have a default VPC in the region you’ve selected, you will use the EC2-VPC platform to launch
your cluster. You screen will look similar to the following:
API Version 2012-12-01
5
Amazon Redshift Getting Started Guide
To Launch an Amazon Redshift Cluster
Use the following values if you are launching your cluster in the EC2-VPC platform:
•
•
•
•
•
•
•
•
•
Cluster Parameter Group: select the default parameter group.
Encrypt Database: None.
Choose a VPC: Default VPC (vpc-xxxxxxxx)
Cluster Subnet Group: default
Publicly Accessible: Yes
Choose a Public IP Address: No
Availability Zone: No Preference
VPC Security Groups: default (sg-xxxxxxxx)
Create CloudWatch Alarm: No
EC2-Classic
If you do not have a VPC, you will use the EC2-Classic platform to launch your cluster. Your screen
will look similar to the following:
API Version 2012-12-01
6
Amazon Redshift Getting Started Guide
To Launch an Amazon Redshift Cluster
Use the following values if you are launching your cluster in the EC2-Classic platform:
•
•
•
•
•
•
7.
Cluster Parameter Group: select the default parameter group.
Encrypt Database: None.
Choose a VPC: Not in VPC
Availability Zone: No Preference
Cluster Security Groups: default
Create CloudWatch Alarm: No
On the Review page, review the selections that you’ve made and then click Launch Cluster.
Your screen will look similar to the following:
API Version 2012-12-01
7
Amazon Redshift Getting Started Guide
Step 3: Authorize Cluster Access
8.
A confirmation page appears and the cluster will take a few minutes to finish. Click Close to return
to the list of clusters.
9.
On the Clusters page, click the cluster that you just launched and review the Cluster Status
information. Make sure that the Cluster Status is available and the Database Health is healthy
before you try to connect to the database later in this tutorial.
Step 3: Authorize Access to the Cluster
In the previous step, you launched your Amazon Redshift cluster. Before you can connect to the cluster,
you need to configure a security group to authorize access:
• If you launched your cluster in the EC2-VPC platform, follow the steps in To Configure the VPC Security
Group (p. 8).
• If you launched your cluster in the EC2-Classic platform, follow the steps in To Configure the Amazon
Redshift Security Group (p. 9).
Note
You only need to configure one of these two types of security groups. Follow the steps that
correspond to the platform in which you launched your cluster.
To Configure the VPC Security Group
1.
2.
In the Amazon Redshift console, in the navigation pane, click Clusters.
Click examplecluster to open it, and make sure you are on the Configuration tab.
3.
Under Cluster Properties, for VPC Security Groups, click your security group.
API Version 2012-12-01
8
Amazon Redshift Getting Started Guide
To Configure the Amazon Redshift Security Group
4.
After your security group opens in the Amazon EC2 console, click the Inbound tab.
5.
Click Edit, and enter the following, then click Save:
• Type: Custom TCP Rule.
• Protocol: TCP.
• Port Range: type the same port number that you used when you launched the cluster. The default
port for Amazon Redshift is 5439, but your port might have been different.
• Source: type 0.0.0.0/0.
Important
Using 0.0.0.0/0 is not recommended for anything other than demonstration purposes
because it allows access from any computer on the internet. In a real environment, you
would create inbound rules based on your own network settings.
To Configure the Amazon Redshift Security Group
1.
2.
In the Amazon Redshift console, in the navigation pane, click Clusters.
Click examplecluster to open it, and make sure you are on the Configuration tab.
3.
Under Cluster Properties, for Cluster Security Groups, click default to open the default security
group.
API Version 2012-12-01
9
Amazon Redshift Getting Started Guide
Step 4: Connect to the Cluster
4.
On the Security Groups tab, in the cluster security group list, click the cluster security group whose
rules you want to manage.
5.
On the Security Group Connections tab, click Add Connection Type.
6.
In the Connection Type box, click CIDR/IP.
In CIDR/IP to Authorize, type 0.0.0.0/0 and click Authorize.
Important
Using 0.0.0.0/0 is not recommended for anything other than demonstration purposes because
it allows access from any computer on the Internet. In a real environment, you would create
inbound rules based on your own network settings.
Step 4: Connect to the Sample Cluster
Now you will connect to your cluster by using a SQL client tool and run a simple query to test the
connection. You can use most SQL client tools that are compatible with PostgreSQL. For this tutorial,
you’ll use the SQL Workbench/J client that you installed in the prerequisites section of this tutorial.
Complete this section by performing the following steps:
• To Get Your Connection String (p. 11)
• To Connect from SQL Workbench/J to Your Cluster (p. 11)
API Version 2012-12-01
10
Amazon Redshift Getting Started Guide
To Get Your Connection String
After you complete this step, you can determine whether you want to load sample data from Amazon S3
in Step 5: Load Sample Data from Amazon S3 (p. 13) or find more information about Amazon Redshift
and reset your environment at Where Do I Go From Here? (p. 17).
To Get Your Connection String
1.
2.
In the Amazon Redshift console, in the navigation pane, click Clusters.
Click examplecluster to open it, and make sure you are on the Configuration tab.
3.
On the Configuration tab, under Cluster Database Properties, copy the JDBC URL of the cluster.
Note
The endpoint for your cluster is not available until the cluster is created and in the available
state.
To Connect from SQL Workbench/J to Your Cluster
1.
2.
3.
4.
5.
Open SQL Workbench/J.
Click File, and then click Connect window.
Click Create a new connection profile.
In the New profile box, type a name for the profile.
Click Manage Drivers. The Manage Drivers dialog opens. In the Name box, type a name for the
driver.
API Version 2012-12-01
11
Amazon Redshift Getting Started Guide
To Connect from SQL Workbench/J to Your Cluster
Click the folder icon next to the Library box, navigate to the location of the driver, click it, and then
click Open.
6.
If the Please select one driver dialog box displays, select com.amazon.redshift.jdbc4.Driver or
com.amazon.redshift.jdbc41.Driver and click OK. SQL Workbench/J automatically completes the
Classname box. Leave the Sample URL box blank, and then click OK.
In the Driver box, select the driver you just added.
7.
8.
In URL, copy the JDBC URL from the Amazon Redshift console and paste it here.
In Username, type masteruser.
9. In Password, type the password associated with the master user account.
10. Select the Autocommit box.
11. Click the Save profile list icon, as shown below:
API Version 2012-12-01
12
Amazon Redshift Getting Started Guide
Step 5: Load Sample Data from Amazon S3
12. Click OK.
Step 5: Load Sample Data from Amazon S3
At this point you have a database called dev and you are connected to it. Now you will create some tables
in the database, upload data to the tables, and try a query. For your convenience, the sample data you
will load is available in Amazon S3 buckets. You will choose a bucket in the same region you created
your cluster. To copy this sample data you will need AWS account credentials (access key ID and secret
access key). Only authenticated users can access this data.
Note
Before you proceed, ensure that your SQL Workbench/J client is connected to the cluster.
After you complete this step, you can find more information about Amazon Redshift and reset your
environment at Where Do I Go From Here? (p. 17).
1.
Create tables.
Copy and execute the following create table statements to create tables in the dev database. For
more information about the syntax, go to CREATE TABLE in the Amazon Redshift Developer Guide.
create table users(
userid integer not null distkey sortkey,
username char(8),
firstname varchar(30),
lastname varchar(30),
city varchar(30),
state char(2),
email varchar(100),
phone char(14),
likesports boolean,
liketheatre boolean,
likeconcerts boolean,
likejazz boolean,
likeclassical boolean,
likeopera boolean,
likerock boolean,
likevegas boolean,
API Version 2012-12-01
13
Amazon Redshift Getting Started Guide
Step 5: Load Sample Data from Amazon S3
likebroadway boolean,
likemusicals boolean);
create table venue(
venueid smallint not null distkey sortkey,
venuename varchar(100),
venuecity varchar(30),
venuestate char(2),
venueseats integer);
create table category(
catid smallint not null distkey sortkey,
catgroup varchar(10),
catname varchar(10),
catdesc varchar(50));
create table date(
dateid smallint not null distkey sortkey,
caldate date not null,
day character(3) not null,
week smallint not null,
month character(5) not null,
qtr character(5) not null,
year smallint not null,
holiday boolean default('N'));
create table event(
eventid integer not null distkey,
venueid smallint not null,
catid smallint not null,
dateid smallint not null sortkey,
eventname varchar(200),
starttime timestamp);
create table listing(
listid integer not null distkey,
sellerid integer not null,
eventid integer not null,
dateid smallint not null sortkey,
numtickets smallint not null,
priceperticket decimal(8,2),
totalprice decimal(8,2),
listtime timestamp);
create table sales(
salesid integer not null,
listid integer not null distkey,
sellerid integer not null,
buyerid integer not null,
eventid integer not null,
dateid smallint not null sortkey,
qtysold smallint not null,
pricepaid decimal(8,2),
commission decimal(8,2),
saletime timestamp);
2.
Copy data from Amazon S3. To optimize performance during bulk loading of large datasets from
Amazon S3 or DynamoDB, we strongly recommend that you use the Amazon Redshift SQL COPY
API Version 2012-12-01
14
Amazon Redshift Getting Started Guide
Step 5: Load Sample Data from Amazon S3
command. For more information about the syntax, go to COPY in the Amazon Redshift Database
Developer Guide.
Copy and execute the following copy statements to upload data from Amazon S3 to the tables in the
dev database.
copy users from 's3://<region-specific-bucket-name>/tickit/allusers_pipe.txt'
CREDENTIALS 'aws_access_key_id=<Your-Access-Key-ID>;aws_secret_ac
cess_key=<Your-Secret-Access-Key>' delimiter '|';
copy venue from 's3://<region-specific-bucket-name>/tickit/venue_pipe.txt'
CREDENTIALS 'aws_access_key_id=<Your-Access-Key-ID>;aws_secret_ac
cess_key=<Your-Secret-Access-Key>' delimiter '|';
copy category from 's3://<region-specific-bucket-name>/tickit/cat
egory_pipe.txt' CREDENTIALS 'aws_access_key_id=<Your-Access-KeyID>;aws_secret_access_key=<Your-Secret-Access-Key>' delimiter '|';
copy date from 's3://<region-specific-bucket-name>/tickit/date2008_pipe.txt'
CREDENTIALS 'aws_access_key_id=<Your-Access-Key-ID>;aws_secret_ac
cess_key=<Your-Secret-Access-Key>' delimiter '|';
copy event from 's3://<region-specific-bucket-name>/tickit/allevents_pipe.txt'
CREDENTIALS 'aws_access_key_id=<Your-Access-Key-ID>;aws_secret_ac
cess_key=<Your-Secret-Access-Key>' delimiter '|'
timeformat 'YYYY-MM-DD HH:MI:SS';
copy listing from 's3://<region-specific-bucket-name>/tickit/list
ings_pipe.txt' CREDENTIALS 'aws_access_key_id=<Your-Access-KeyID>;aws_secret_access_key=<Your-Secret-Access-Key>' delimiter '|';
copy sales from 's3://<region-specific-bucket-name>/tickit/sales_tab.txt'CRE
DENTIALS 'aws_access_key_id=<Your-Access-Key-ID>;aws_secret_access_key=<YourSecret-Access-Key>'
delimiter '\t' timeformat 'MM/DD/YYYY HH:MI:SS';
The values for <Your-Access-Key-ID> and <Your-Secret-Access-Key> are the AWS credentials
needed to access the Amazon S3 objects. The sample data for this tutorial is provided in Amazon
S3 buckets that give read access to all authenticated AWS users, so any valid AWS credentials that
permit access to Amazon S3 will work. If you need to create new access keys, go to Administering
Access Keys for IAM Users. Use the following table to find the correct bucket name to use.
Region
<region-specific-bucket-name>
US East (N. Virginia)
awssampledb
US West (Oregon)
awssampledbuswest2
EU (Frankfurt)
awssampledbeucentral1
EU (Ireland)
awssampledbeuwest1
Asia Pacific (Singapore)
awssampledbapsoutheast1
Asia Pacific (Sydney)
awssampledbapsoutheast2
Asia Pacific (Tokyo)
awssampledbapnortheast1
Note
If you want to upload your own data instead of the sample data, you must have your own
Amazon S3 bucket. For information about creating a bucket and uploading data, go to
Creating a Bucket and Uploading Objects into Amazon S3 in the Amazon Simple Storage
Service Console User Guide.
API Version 2012-12-01
15
Amazon Redshift Getting Started Guide
Step 5: Load Sample Data from Amazon S3
3.
Now try the example queries. For more information, go to SELECT in the Amazon Redshift Developer
Guide.
-- Get definition for the sales table.
SELECT *
FROM pg_table_def
WHERE tablename = 'sales';
-- Find total sales on a given calendar date.
SELECT sum(qtysold)
FROM
sales, date
WHERE sales.dateid = date.dateid
AND
caldate = '2008-01-05';
-- Find top 10 buyers by quantity.
SELECT firstname, lastname, total_quantity
FROM
(SELECT buyerid, sum(qtysold) total_quantity
FROM sales
GROUP BY buyerid
ORDER BY total_quantity desc limit 10) Q, users
WHERE Q.buyerid = userid
ORDER BY Q.total_quantity desc;
-- Find events in the 99.9 percentile in terms of all time gross sales.
SELECT eventname, total_price
FROM (SELECT eventid, total_price, ntile(1000) over(order by total_price
desc) as percentile
FROM (SELECT eventid, sum(pricepaid) total_price
FROM
sales
GROUP BY eventid)) Q, event E
WHERE Q.eventid = E.eventid
AND percentile = 1
ORDER BY total_price desc;
4.
You can optionally go the Amazon Redshift console to review the queries you executed. The Queries
tab shows a list of queries that you executed over a time period you specify. By default, the console
displays queries that have executed in the last 24 hours, including currently executing queries.
• Access the Amazon Redshift console at https://console.aws.amazon.com/redshift.
• In the cluster list in the right pane, click examplecluster.
• Click the Queries tab.
The console displays list of queries you executed as shown in the example below.
• In the list of queries, select a query to find more information about it.
API Version 2012-12-01
16
Amazon Redshift Getting Started Guide
Step 6: Find Additional Resources and Reset Your
Environment
The query information appears in a new Query tab. The following example shows the details of a
query you ran in a previous step.
Step 6: Find Additional Resources and Reset
Your Environment
When you have completed this tutorial, you can go to other Amazon Redshift resources to learn more
about the concepts introduced in this guide or you can reset your environment to the previous state. You
might want to keep the sample cluster running if you intend to try tasks in other Amazon Redshift guides.
However, remember that you will continue to be charged for your cluster as long as it is running.
You should revoke access to the cluster and delete it when you no longer need it so that you stop incurring
charges.
Where Do I Go From Here?
Additional Resources
We recommend that you continue to learn more about the concepts introduced in this guide with the
following resources:
• Amazon Redshift Management Overview: This topic provides an overview of Amazon Redshift.
• Amazon Redshift Cluster Management Guide: This guide builds upon this Amazon Redshift Getting
Started and provides in-depth information about the concepts and tasks for creating, managing, and
monitoring clusters.
• Amazon Redshift Database Developer Guide: This guide builds upon this Amazon Redshift Getting
Started by providing in-depth information for database developers about designing, building, querying,
and maintaining the databases that make up your data warehouse.
Resetting Your Environment
When you have completed this tutorial, you should reset your environment to the previous state by doing
the following:
• Revoke access to the port and CIDR/IP address for which you authorized access:
If you used the EC2-VPC platform to launch your cluster, perform the steps in To Revoke Access from
the VPC Security Group (p. 18).
API Version 2012-12-01
17
Amazon Redshift Getting Started Guide
Where Do I Go From Here?
If you used the EC2-Classic platform to launch your cluster, perform the steps in To Revoke Access
from the Cluster Security Group (p. 19).
• Delete your sample cluster. You will continue to incur charges for the Amazon Redshift service
until you delete the cluster. Perform the steps in To Delete the Sample Cluster (p. 19).
To Revoke Access from the VPC Security Group
1.
2.
In the Amazon Redshift console, in the navigation pane, click Clusters.
Click examplecluster to open it, and make sure you are on the Configuration tab.
3.
Under Cluster Properties, click View VPC Security Groups.
4.
With the default security group selected, click the Inbound tab and then click Edit.
5.
Delete the custom TCP/IP ingress rule that you created for your port and CIDR/IP address 0.0.0.0/0.
Do not remove any other rules, such as the All traffic rule that was created for the security group
by default. Click Save.
API Version 2012-12-01
18
Amazon Redshift Getting Started Guide
Where Do I Go From Here?
To Revoke Access from the Cluster Security Group
1.
2.
3.
In the Amazon Redshift console, in the navigation pane, click Clusters.
Click examplecluster to open it, and make sure you are on the Configuration tab.
Under Cluster Properties, for Cluster Security Groups, click default to open the default security
group.
4.
Under Cluster Security Group, locate the CIDR/IP ingress rule that you authorized earlier in the
tutorial, and click Revoke.
To Delete the Sample Cluster
1.
2.
3.
In the Amazon Redshift console, in the navigation pane, click Clusters.
Click examplecluster to open it, and make sure you are on the Configuration tab.
In the Cluster menu, click Shut Down.
4.
In the Shut Down Cluster window, for Create snapshot, click No and then click Shut Down.
API Version 2012-12-01
19
Amazon Redshift Getting Started Guide
Where Do I Go From Here?
5.
On the cluster details window, the Cluster Status will display that the cluster being deleted.
API Version 2012-12-01
20
Amazon Redshift Getting Started Guide
Document History
The following table describes the important changes since the last release of the Amazon Redshift Getting
Started Guide.
Latest documentation update: April 30, 2015
Change
Description
Release Date
Documentation Up- Updated screenshots and procedure for configuring VPC April 30, 2015
date
security groups.
Documentation Up- Updated screenshots and procedures to match the current November 12, 2014
date
console.
Documentation Up- Moved loading data from Amazon S3 information into its
date
own section and moved next steps section into the final
step for better discoverability.
May 13, 2014
Documentation Up- Removed the Welcome page and incorporated the content March 14, 2014
date
into the main Getting Started page.
Documentation Up- This is a new release of the Amazon Redshift Getting
date
Started Guide that addresses customer feedback and
service updates.
March 14, 2014
New Guide
February 14, 2013
This is the first release of the Amazon Redshift Getting
Started Guide.
API Version 2012-12-01
21