[JAWS-UG CLI] Amazon Redshift 入門 (5) 各種設定の確認

# このハンズオンについて
- このハンズオンでは、Redshiftのクラスターとそのクラスタに対してクエリを発行するインスタンスの作成を実施します。
- クエリの発行には、「psql」を利用します。本手順では、Amazon Linux上へのインストールと利用方法を説明します。


# 前提条件

## バージョン確認

このハンズオンは以下のバージョンで動作確認を行いました。

```bash:コマンド
aws --version
```

```text:結果
aws-cli/1.10.23 Python/2.7.10 Linux/4.4.5-15.26.amzn1.x86_64 botocore/1.4.14
```

## 必要な権限

作業にあたっては、以下の権限を有したIAMユーザもしくはIAMロールを利用してください。

- EC2に対するフルコントロール権限
- RedShiftに関するフルコントロール権限
- IAMに関するフルコントロール権限
- S3に関するフルコントロール権限
- STSに関するフルコントロール権限


# 0. 準備

## リージョンを指定

```bash:コマンド
export AWS_DEFAULT_REGION='ap-northeast-1'
```

## 資格情報を確認

```bash:コマンド
aws configure list
```

```text:結果
Name                    Value             Type    Location
----                    -----             ----    --------
profile                <not set>             None    None
access_key     ****************RDPA         iam-role
secret_key     ****************9GA8         iam-role
region           ap-northeast-1              env    AWS_DEFAULT_REGION
```


# 1. クラスターパラメータグループ

## クラスターパラメータグループの確認

パラメーターグループでは、Redshiftクラスタに対する設定定義することができます。

```bash:コマンド
aws redshift describe-cluster-parameter-groups
```

```json:結果
{
    "ParameterGroups": [
        {
            "ParameterGroupFamily": "redshift-1.0",
            "Tags": [],
            "ParameterGroupName": "default.redshift-1.0",
            "Description": "Default parameter group for redshift-1.0"
        }
    ]
}
```

## クラスターパラメータグループファミリーの特定

パラメーターグループは、どのRedshiftエンジンのバージョンで利用可能か識別されています。
現在、RedshiftエンジンはVer 1系のみ存在します。

ここでは、デフォルトで存在するパラメータグループのクラスターパラメータグループファミリーを確認します。

```bash:コマンド
CLUSTER_PARAMETER_GROUP_FAMILY=`aws redshift describe-cluster-parameter-groups \
  --query ParameterGroups[0].ParameterGroupFamily \
  | sed s/\"//g` \
  && echo ${CLUSTER_PARAMETER_GROUP_FAMILY}
```

```text:結果
redshift-1.0
```

## デフォルトクラスターパラメータの確認

クラスターパラメータグループファミリーの中で、デフォルトのパラメータを確認します。

```bash:コマンド
aws redshift describe-default-cluster-parameters \
  --parameter-group-family ${CLUSTER_PARAMETER_GROUP_FAMILY}
```

```json:結果
{
    "DefaultClusterParameters": {
        "Parameters": [
            {
                "Description": "Sets the display format for date and time values.",
                "DataType": "string",
                "IsModifiable": true,
                "Source": "engine-default",
                "ParameterValue": "ISO, MDY",
                "ParameterName": "datestyle",
                "ApplyType": "static"
            },
            {
                "Description": "parameter for audit logging purpose",
                "DataType": "boolean",
                "IsModifiable": true,
                "AllowedValues": "true,false",
                "Source": "engine-default",
                "ParameterValue": "false",
                "ParameterName": "enable_user_activity_logging",
                "ApplyType": "static"
            },
            {
                "Description": "Sets the number of digits displayed for floating-point values",
                "DataType": "integer",
                "IsModifiable": true,
                "AllowedValues": "-15-2",
                "Source": "engine-default",
                "ParameterValue": "0",
                "ParameterName": "extra_float_digits",
                "ApplyType": "static"
            },
            {
                "Description": "Sets the max cursor result set size",
                "DataType": "integer",
                "IsModifiable": true,
                "AllowedValues": "0-14400000",
                "Source": "engine-default",
                "ParameterValue": "default",
                "ParameterName": "max_cursor_result_set_size",
                "ApplyType": "static"
            },
            {
                "Description": "This parameter applies a user-defined label to a group of queries that are run during the same session..",
                "DataType": "string",
                "IsModifiable": true,
                "Source": "engine-default",
                "ParameterValue": "default",
                "ParameterName": "query_group",
                "ApplyType": "static"
            },
            {
                "Description": "require ssl for all databaseconnections",
                "DataType": "boolean",
                "IsModifiable": true,
                "AllowedValues": "true,false",
                "Source": "engine-default",
                "ParameterValue": "false",
                "ParameterName": "require_ssl",
                "ApplyType": "static"
            },
            {
                "Description": "Sets the schema search order for names that are not schema-qualified.",
                "DataType": "string",
                "IsModifiable": true,
                "Source": "engine-default",
                "ParameterValue": "$user, public",
                "ParameterName": "search_path",
                "ApplyType": "static"
            },
            {
                "Description": "Aborts any statement that takes over the specified number of milliseconds.",
                "DataType": "integer",
                "IsModifiable": true,
                "AllowedValues": "0,100-2147483647",
                "Source": "engine-default",
                "ParameterValue": "0",
                "ParameterName": "statement_timeout",
                "ApplyType": "static"
            },
            {
                "Description": "wlm json configuration",
                "DataType": "string",
                "IsModifiable": true,
                "Source": "engine-default",
                "ParameterValue": "[{\"query_concurrency\":5}]",
                "ParameterName": "wlm_json_configuration",
                "ApplyType": "static"
            }
        ]
    }
}
```

## デフォルトクラスターパラメータグループの特定

```bash:コマンド
CLUSTER_PARAMETER_GROUP_NAME=`aws redshift describe-cluster-parameter-groups \
  --query ParameterGroups[0].ParameterGroupName \
  | sed s/\"//g` \
  && echo ${CLUSTER_PARAMETER_GROUP_NAME}
```

```text:結果
default.redshift-1.0
```


## クラスターパラメータの確認

```bash:コマンド
aws redshift describe-cluster-parameters --parameter-group-name ${CLUSTER_PARAMETER_GROUP_NAME}

```

```json:結果
{
    "Parameters": [
        {
            "Description": "Sets the display format for date and time values.",
            "DataType": "string",
            "IsModifiable": true,
            "Source": "engine-default",
            "ParameterValue": "ISO, MDY",
            "ParameterName": "datestyle",
            "ApplyType": "static"
        },
        {
            "Description": "parameter for audit logging purpose",
            "DataType": "boolean",
            "IsModifiable": true,
            "AllowedValues": "true,false",
            "Source": "engine-default",
            "ParameterValue": "false",
            "ParameterName": "enable_user_activity_logging",
            "ApplyType": "static"
        },
        {
            "Description": "Sets the number of digits displayed for floating-point values",
            "DataType": "integer",
            "IsModifiable": true,
            "AllowedValues": "-15-2",
            "Source": "engine-default",
            "ParameterValue": "0",
            "ParameterName": "extra_float_digits",
            "ApplyType": "static"
        },
        {
            "Description": "Sets the max cursor result set size",
            "DataType": "integer",
            "IsModifiable": true,
            "AllowedValues": "0-14400000",
            "Source": "engine-default",
            "ParameterValue": "default",
            "ParameterName": "max_cursor_result_set_size",
            "ApplyType": "static"
        },
        {
            "Description": "This parameter applies a user-defined label to a group of queries that are run during the same session..",
            "DataType": "string",
            "IsModifiable": true,
            "Source": "engine-default",
            "ParameterValue": "default",
            "ParameterName": "query_group",
            "ApplyType": "static"
        },
        {
            "Description": "require ssl for all databaseconnections",
            "DataType": "boolean",
            "IsModifiable": true,
            "AllowedValues": "true,false",
            "Source": "engine-default",
            "ParameterValue": "false",
            "ParameterName": "require_ssl",
            "ApplyType": "static"
        },
        {
            "Description": "Sets the schema search order for names that are not schema-qualified.",
            "DataType": "string",
            "IsModifiable": true,
            "Source": "engine-default",
            "ParameterValue": "$user, public",
            "ParameterName": "search_path",
            "ApplyType": "static"
        },
        {
            "Description": "Aborts any statement that takes over the specified number of milliseconds.",
            "DataType": "integer",
            "IsModifiable": true,
            "AllowedValues": "0,100-2147483647",
            "Source": "engine-default",
            "ParameterValue": "0",
            "ParameterName": "statement_timeout",
            "ApplyType": "static"
        },
        {
            "Description": "wlm json configuration",
            "DataType": "string",
            "IsModifiable": true,
            "Source": "engine-default",
            "ParameterValue": "[{\"query_concurrency\":5}]",
            "ParameterName": "wlm_json_configuration",
            "ApplyType": "static"
        }
    ]
}
```

# 2. クラスターバージョン

## クラスターバージョンの確認

```bash:コマンド
aws redshift describe-cluster-versions
```

```json:結果
{
    "ClusterVersions": [
        {
            "ClusterVersion": "1.0",
            "Description": "Release DB 1.0.647",
            "ClusterParameterGroupFamily": "redshift-1.0"
        }
    ]
}
```

1.0はエンジンのメジャーバージョン、647はエンジンのマイナーバージョンです。


# 3. スナップショットコピー

## クロスリージョンスナップショットの設定を確認

有効化されているクロスリージョンスナップショットの設定一覧を確認します。

```bash:コマンド
aws redshift describe-snapshot-copy-grants
```

```json:結果
{
    "SnapshotCopyGrants": []
}
```

# 4. イベント

SNSを利用し、特定のイベントが発生した際に通知することが可能です。

## イベント関連のコマンドを確認

発生したイベントの一覧を確認します。

```bash:コマンド
aws redshift describe-events
```

```json:結果
{
    "Events": [
        {
            "EventId": "REDSHIFT-EVENT-2000",
            "EventCategories": [
                "management"
            ],
            "SourceType": "cluster",
            "Date": "2016-05-01T08:52:44.741Z",
            "Message": "Amazon Redshift cluster 'mycluster' has been created at 2016-05-01 08:52 UTC and is ready for use.",
            "SourceIdentifier": "mycluster",
            "Severity": "INFO"
        },
        {
            "EventId": "REDSHIFT-EVENT-2009",
            "EventCategories": [
                "management"
            ],
            "SourceType": "cluster-snapshot",
            "Date": "2016-05-01T09:18:49.152Z",
            "Message": "The cluster snapshot 'mysnapshot' for Amazon Redshift cluster 'mycluster' started at 2016-05-01 09:18 UTC. You can view progress from the Amazon Redshift console.",
            "SourceIdentifier": "mysnapshot",
            "Severity": "INFO"
        },
        {
            "EventId": "REDSHIFT-EVENT-3004",
            "EventCategories": [
                "monitoring"
            ],
            "SourceType": "cluster-snapshot",
            "Date": "2016-05-01T09:18:53.768Z",
            "Message": "The cluster snapshot 'mysnapshot' for Amazon Redshift cluster 'mycluster' completed successfully at 2016-05-01 09:18 UTC.",
            "SourceIdentifier": "mysnapshot",
            "Severity": "INFO"
        },
        {
            "EventId": "REDSHIFT-EVENT-2011",
            "EventCategories": [
                "management"
            ],
            "SourceType": "cluster-snapshot",
            "Date": "2016-05-01T09:32:19.318Z",
            "Message": "The cluster snapshot 'mysnapshot' for Amazon Redshift cluster 'mycluster' was deleted at 2016-05-01 09:32 UTC.",
            "SourceIdentifier": "mysnapshot",
            "Severity": "INFO"
        }
    ]
}
```

定義されているイベントの一覧を確認します。

```bash:コマンド
aws redshift describe-event-categories
```

```json:結果
{
    "EventCategoriesMapList": [
        {
            "SourceType": "cluster",
            "Events": [
                {
                    "EventId": "REDSHIFT-EVENT-2000",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster <cluster name> created at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-2001",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster <cluster name> deleted at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3000",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster <cluster name> rebooted at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3001",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster <cluster name> node replaced at <time in UTC>. Cluster operating normally."
                },
                {
                    "EventId": "REDSHIFT-EVENT-4000",
                    "EventCategories": [
                        "security"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Master credentials updated for cluster <cluster name> at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-1000",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Parameter group <parameter group name> changes were associated with cluster <cluster name> at <time in UTC>. Changes will be applied on reboot."
                },
                {
                    "EventId": "REDSHIFT-EVENT-2002",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "VPC security groups for cluster <cluster name> updated at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-2003",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Maintenance started on cluster <cluster name> at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-2004",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Maintenance on cluster <cluster name> completed at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-2006",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster <cluster name> resize started at <time in UTC>. Cluster is in read-only mode."
                },
                {
                    "EventId": "REDSHIFT-EVENT-2007",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "A resize request for cluster <cluster name> has been acknowledged."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3002",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster <cluster name> resize completed at <time in UTC>. Cluster is available for both reads and writes."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3500",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "Cluster <cluster name> resize failed at <time in UTC>. Operation will be retried within a few minutes."
                },
                {
                    "EventId": "REDSHIFT-EVENT-1001",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster <cluster name> parameter group changed to <parameter group name> at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-1500",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "VPC <VPC name> does not exist. Configuration changes for cluster <cluster name> were not applied."
                },
                {
                    "EventId": "REDSHIFT-EVENT-1501",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "Subnets in cluster subnet group <subnet name> for Amazon VPC <VPC name> do not exist or are invalid. Cluster <cluster name> could not be created."
                },
                {
                    "EventId": "REDSHIFT-EVENT-1502",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "Subnets in cluster subnet group <subnet name> have no available IP addresses. Cluster <cluster name> could not be created."
                },
                {
                    "EventId": "REDSHIFT-EVENT-1503",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "VPC <VPC name> has no Internet gateway. Configuration changes for cluster <cluster name> were not applied."
                },
                {
                    "EventId": "REDSHIFT-EVENT-2008",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster restore <cluster name> from snapshot <snapshot name> started at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3003",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster <cluster name> was restored from cluster snapshot <snapshot name> at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3501",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "Cluster restore <cluster name> from cluster snapshot <snapshot name> failed at <time in UTC>. Retry from the Amazon Redshift console."
                },
                {
                    "EventId": "REDSHIFT-EVENT-4500",
                    "EventCategories": [
                        "security"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "A VPC security group is invalid. Configuration changes for cluster <cluster name> were not applied."
                },
                {
                    "EventId": "REDSHIFT-EVENT-4501",
                    "EventCategories": [
                        "security"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "An EC2 security group <security group name> specified in cluster security group <security group name> was not found. Authorization cannot be completed."
                },
                {
                    "EventId": "REDSHIFT-EVENT-4001",
                    "EventCategories": [
                        "security"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Security group of cluster <cluster name> modified at <time in UTC>. Changes will be automatically applied to all associated clusters."
                },
                {
                    "EventId": "REDSHIFT-EVENT-1504",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "Unable to connect to HSM for cluster <cluster name>.  Please consult the documentation for troubleshooting details."
                },
                {
                    "EventId": "REDSHIFT-EVENT-1505",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "Unable to register HSM for cluster <cluster name>. Please provide a different configuration."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3007",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Your Snapshot <snapshot name> was successfully copied from region <source region> to <destination region> at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3504",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "S3 bucket <S3 bucket name> is no longer valid for logging for cluster <cluster name>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3505",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "The S3 Bucket <S3 bucket name> does not have the necessary IAM policies for cluster <cluster name>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3506",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "S3 bucket <S3 bucket name> does not exist. Logging cannot be continued for cluster <cluster name>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3507",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "Cluster <cluster name> cannot be created.  EIP <ip address> is currently in use."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3508",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "Cluster <cluster name> cannot be created. EIP <ip address> could not be found."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3509",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "Cross Region Snapshot Copy is not enabled for cluster <cluster name>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-2013",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster renamed to <new cluster identifier> at <time in UTC>."
                }
            ]
        },
        {
            "SourceType": "cluster-security-group",
            "Events": [
                {
                    "EventId": "REDSHIFT-EVENT-4002",
                    "EventCategories": [
                        "security"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster security group <security group name> created at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-4003",
                    "EventCategories": [
                        "security"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster security group <security group name> deleted at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-4004",
                    "EventCategories": [
                        "security"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster security group <security group name> updated at <time in UTC>. Changes will be automatically applied to associated clusters."
                }
            ]
        },
        {
            "SourceType": "cluster-parameter-group",
            "Events": [
                {
                    "EventId": "REDSHIFT-EVENT-1002",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Parameter <parameter name> in Parameter Group <parameter group name> was updated to <new value> at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-1003",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster parameter group <parameter group name> created at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-1004",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster parameter group <parameter group name> deleted at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-1005",
                    "EventCategories": [
                        "configuration"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster parameter group <parameter group name> was updated at <time in UTC>. Changes will be applied to associated clusters on reboot."
                }
            ]
        },
        {
            "SourceType": "cluster-snapshot",
            "Events": [
                {
                    "EventId": "REDSHIFT-EVENT-2009",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster snapshot <snapshot name> for cluster <cluster name> started at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3004",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster snapshot <snapshot name> for cluster <cluster name> completed successfully at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3503",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "Cluster snapshot <snapshot name> for cluster <cluster name> failed at time <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-2010",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster snapshot <snapshot name>' for cluster <cluster name> cancelled at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-2011",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Cluster snapshot <snapshot name> for cluster <cluster name> was deleted at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-2012",
                    "EventCategories": [
                        "management"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Final cluster snapshot <snapshot name> for cluster <cluster name> started at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3005",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Final cluster snapshot <snapshot name> for cluster <cluster name> succeeded at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3502",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "ERROR",
                    "EventDescription": "Final cluster snapshot <snapshot name> for cluster <cluster name> failed at <time in UTC>."
                },
                {
                    "EventId": "REDSHIFT-EVENT-3006",
                    "EventCategories": [
                        "monitoring"
                    ],
                    "Severity": "INFO",
                    "EventDescription": "Final cluster snapshot <snapshot name> for cluster <cluster name> cancelled at <time in UTC>."
                }
            ]
        }
    ]
}
```

通知設定を行っているイベントの一覧を確認します。

```bash:コマンド
aws redshift describe-event-subscriptions
```

```json:結果
{
    "EventSubscriptionsList": []
}
```

# 5. ログ

## ログの取得設定の確認

S3バケットに監査ログを出力しているかを確認します。

```bash:コマンド
aws redshift describe-logging-status --cluster-identifier mycluster
```

```json:結果
{
    "LoggingEnabled": false
}
```

# 6. 購入可能なリザーブドノード

## 購入可能なリザーブドノードの確認

```bash:コマンド
aws redshift describe-orderable-cluster-options
```

```json:結果
{
    "OrderableClusterOptions": [
        {
            "NodeType": "ds2.8xlarge",
            "AvailabilityZones": [
                {
                    "Name": "ap-northeast-1a"
                },
                {
                    "Name": "ap-northeast-1c"
                }
            ],
            "ClusterVersion": "1.0",
            "ClusterType": "multi-node"
        },
        {
            "NodeType": "ds2.xlarge",
            "AvailabilityZones": [
                {
                    "Name": "ap-northeast-1a"
                },
                {
                    "Name": "ap-northeast-1c"
                }
            ],
            "ClusterVersion": "1.0",
            "ClusterType": "multi-node"
        },
        {
            "NodeType": "ds2.xlarge",
            "AvailabilityZones": [
                {
                    "Name": "ap-northeast-1a"
                },
                {
                    "Name": "ap-northeast-1c"
                }
            ],
            "ClusterVersion": "1.0",
            "ClusterType": "single-node"
        },
        {
            "NodeType": "ds1.8xlarge",
            "AvailabilityZones": [
                {
                    "Name": "ap-northeast-1a"
                },
                {
                    "Name": "ap-northeast-1c"
                }
            ],
            "ClusterVersion": "1.0",
            "ClusterType": "multi-node"
        },
        {
            "NodeType": "ds1.xlarge",
            "AvailabilityZones": [
                {
                    "Name": "ap-northeast-1a"
                },
                {
                    "Name": "ap-northeast-1c"
                }
            ],
            "ClusterVersion": "1.0",
            "ClusterType": "multi-node"
        },
        {
            "NodeType": "ds1.xlarge",
            "AvailabilityZones": [
                {
                    "Name": "ap-northeast-1a"
                },
                {
                    "Name": "ap-northeast-1c"
                }
            ],
            "ClusterVersion": "1.0",
            "ClusterType": "single-node"
        },
        {
            "NodeType": "dc1.8xlarge",
            "AvailabilityZones": [
                {
                    "Name": "ap-northeast-1a"
                },
                {
                    "Name": "ap-northeast-1c"
                }
            ],
            "ClusterVersion": "1.0",
            "ClusterType": "multi-node"
        },
        {
            "NodeType": "dc1.large",
            "AvailabilityZones": [
                {
                    "Name": "ap-northeast-1a"
                },
                {
                    "Name": "ap-northeast-1c"
                }
            ],
            "ClusterVersion": "1.0",
            "ClusterType": "multi-node"
        },
        {
            "NodeType": "dc1.large",
            "AvailabilityZones": [
                {
                    "Name": "ap-northeast-1a"
                },
                {
                    "Name": "ap-northeast-1c"
                }
            ],
            "ClusterVersion": "1.0",
            "ClusterType": "single-node"
        }
    ]
}
```

# 7. タグ

## タグ付け状況の確認

```bash:コマンド
aws redshift describe-tags
```

```json:結果
{
    "TaggedResources": []
}
```

以上です。