aws healthコマンドを触ってみた

# AWS Personal Health Dashboard

先日、リリースされたAWSの新しいサービスです。

[AWS Personal Health Dashboard – 関係するリソースの管理](https://aws.amazon.com/jp/blogs/news/aws-personal-health-dashboard/)

[AWS Health Documentation](https://aws.amazon.com/jp/documentation/health/)

早速、使ってみたいと思います。（AWS CLIで！）

# 注意点

- エンドポイントは、バージニアリージョンのみ
- サポートが「ビジネス」以上でないと使えない

```bash:コマンド
export AWS_DEFAULT_REGION="us-east-1"
```

# 使ってみた

## どんなイベントを管理できるの？

とりあえず、describe-event-typesコマンドを実行してみます。

先に結論から言うと、200以上ありましたｗ

```bash:コマンド（1回目）
aws health describe-event-types \
    --max-results 100
```

```bash:コマンド（2回目以降）
aws health describe-event-types \
    --max-results 100 \
    --next-token ****************************************************************************
```

```json:結果（1回目）
{
    "eventTypes": [
        {
            "category": "issue",
            "code": "AWS_ACM_API_ISSUE",
            "service": "ACM"
        },
        {
            "category": "issue",
            "code": "AWS_ACM_OPERATIONAL_ISSUE",
            "service": "ACM"
        },
        {
            "category": "issue",
            "code": "AWS_APIGATEWAY_API_ISSUE",
            "service": "APIGATEWAY"
        },
        {
            "category": "issue",
            "code": "AWS_APIGATEWAY_OPERATIONAL_ISSUE",
            "service": "APIGATEWAY"
        },
        {
            "category": "issue",
            "code": "AWS_APPSTREAM_API_ISSUE",
            "service": "APPSTREAM"
        },
        {
            "category": "issue",
            "code": "AWS_APPSTREAM_OPERATIONAL_ISSUE",
            "service": "APPSTREAM"
        },
        {
            "category": "issue",
            "code": "AWS_AUTOSCALING_API_ISSUE",
            "service": "AUTOSCALING"
        },
        {
            "category": "issue",
            "code": "AWS_AUTOSCALING_INCREASED_LAUNCH_ERRORS",
            "service": "AUTOSCALING"
        },
        {
            "category": "issue",
            "code": "AWS_AUTOSCALING_OPERATIONAL_ISSUE",
            "service": "AUTOSCALING"
        },
        {
            "category": "accountNotification",
            "code": "AWS_BILLING_NOTIFICATION",
            "service": "BILLING"
        },
        {
            "category": "accountNotification",
            "code": "AWS_BILLING_PAYMENT_POSTING_DELAYED",
            "service": "BILLING"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDFORMATION_API_ISSUE",
            "service": "CLOUDFORMATION"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDFORMATION_INCREASED_STACK_CREATE_DELETE_UPDATE_TIMES",
            "service": "CLOUDFORMATION"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDFORMATION_OPERATIONAL_ISSUE",
            "service": "CLOUDFORMATION"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDFRONT_API_ISSUE",
            "service": "CLOUDFRONT"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDFRONT_CHANGE_PROPAGATION_DELAYS",
            "service": "CLOUDFRONT"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDFRONT_INCREASED_DNS_ERRORS",
            "service": "CLOUDFRONT"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDFRONT_INCREASED_MANAGEMENT_CONSOLE_ERROR_RATES",
            "service": "CLOUDFRONT"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDFRONT_OPERATIONAL_ISSUE",
            "service": "CLOUDFRONT"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDHSM_API_ISSUE",
            "service": "CLOUDHSM"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDHSM_NETWORK_CONNECTIVITY_ISSUE",
            "service": "CLOUDHSM"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDHSM_OPERATIONAL_ISSUE",
            "service": "CLOUDHSM"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDSEARCH_API_ISSUE",
            "service": "CLOUDSEARCH"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDSEARCH_DOMAIN_CREATION_INDEXING_OPERATIONS",
            "service": "CLOUDSEARCH"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDSEARCH_INDEXDOCUMENTS_DELAYS",
            "service": "CLOUDSEARCH"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDSEARCH_OPERATIONAL_ISSUE",
            "service": "CLOUDSEARCH"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDTRAIL_API_ISSUE",
            "service": "CLOUDTRAIL"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDTRAIL_EVENT_DELIVERY_DELAYS",
            "service": "CLOUDTRAIL"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDTRAIL_OPERATIONAL_ISSUE",
            "service": "CLOUDTRAIL"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDWATCH_ALARM_DELAYS",
            "service": "CLOUDWATCH"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDWATCH_API_ISSUE",
            "service": "CLOUDWATCH"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDWATCH_DELAYED_METRICS",
            "service": "CLOUDWATCH"
        },
        {
            "category": "issue",
            "code": "AWS_CLOUDWATCH_OPERATIONAL_ISSUE",
            "service": "CLOUDWATCH"
        },
        {
            "category": "issue",
            "code": "AWS_CODECOMMIT_API_ISSUE",
            "service": "CODECOMMIT"
        },
        {
            "category": "issue",
            "code": "AWS_CODECOMMIT_OPERATIONAL_ISSUE",
            "service": "CODECOMMIT"
        },
        {
            "category": "issue",
            "code": "AWS_CODEDEPLOY_API_ISSUE",
            "service": "CODEDEPLOY"
        },
        {
            "category": "issue",
            "code": "AWS_CODEDEPLOY_INCREASED_DEPLOYMENT_ERROR_RATES",
            "service": "CODEDEPLOY"
        },
        {
            "category": "issue",
            "code": "AWS_CODEDEPLOY_OPERATIONAL_ISSUE",
            "service": "CODEDEPLOY"
        },
        {
            "category": "issue",
            "code": "AWS_CODEPIPELINE_API_ISSUE",
            "service": "CODEPIPELINE"
        },
        {
            "category": "issue",
            "code": "AWS_CODEPIPELINE_OPERATIONAL_ISSUE",
            "service": "CODEPIPELINE"
        },
        {
            "category": "issue",
            "code": "AWS_COGNITO_API_ISSUE",
            "service": "COGNITO"
        },
        {
            "category": "accountNotification",
            "code": "AWS_COGNITO_APPROACHING_DATASET_COUNT_LIMIT",
            "service": "COGNITO"
        },
        {
            "category": "accountNotification",
            "code": "AWS_COGNITO_APPROACHING_IDENTITY_POOL_COUNT_LIMIT",
            "service": "COGNITO"
        },
        {
            "category": "accountNotification",
            "code": "AWS_COGNITO_APPROACHING_USER_POOL_CLIENT_COUNT_LIMIT",
            "service": "COGNITO"
        },
        {
            "category": "accountNotification",
            "code": "AWS_COGNITO_APPROACHING_USER_POOL_COUNT_LIMIT",
            "service": "COGNITO"
        },
        {
            "category": "issue",
            "code": "AWS_COGNITO_DATASET_COUNT_LIMIT_REACHED",
            "service": "COGNITO"
        },
        {
            "category": "issue",
            "code": "AWS_COGNITO_IDENTITY_POOL_COUNT_LIMIT_REACHED",
            "service": "COGNITO"
        },
        {
            "category": "issue",
            "code": "AWS_COGNITO_ISSUES_WITH_STREAMS_ROLE",
            "service": "COGNITO"
        },
        {
            "category": "issue",
            "code": "AWS_COGNITO_OPERATIONAL_ISSUE",
            "service": "COGNITO"
        },
        {
            "category": "issue",
            "code": "AWS_COGNITO_USER_POOL_CLIENT_COUNT_LIMIT_REACHED",
            "service": "COGNITO"
        },
        {
            "category": "issue",
            "code": "AWS_COGNITO_USER_POOL_COUNT_LIMIT_REACHED",
            "service": "COGNITO"
        },
        {
            "category": "issue",
            "code": "AWS_CONFIG_API_ISSUE",
            "service": "CONFIG"
        },
        {
            "category": "issue",
            "code": "AWS_CONFIG_INCREASED_LATENCIES_CAPTURING_CONFIGURATION_CHANGES",
            "service": "CONFIG"
        },
        {
            "category": "issue",
            "code": "AWS_CONFIG_OPERATIONAL_ISSUE",
            "service": "CONFIG"
        },
        {
            "category": "issue",
            "code": "AWS_DATAPIPELINE_API_ISSUE",
            "service": "DATAPIPELINE"
        },
        {
            "category": "issue",
            "code": "AWS_DATAPIPELINE_OPERATIONAL_ISSUE",
            "service": "DATAPIPELINE"
        },
        {
            "category": "issue",
            "code": "AWS_DEVICEFARM_API_ISSUE",
            "service": "DEVICEFARM"
        },
        {
            "category": "issue",
            "code": "AWS_DEVICEFARM_OPERATIONAL_ISSUE",
            "service": "DEVICEFARM"
        },
        {
            "category": "issue",
            "code": "AWS_DIRECTCONNECT_API_ISSUE",
            "service": "DIRECTCONNECT"
        },
        {
            "category": "issue",
            "code": "AWS_DIRECTCONNECT_CONNECTIVITY_ISSUE",
            "service": "DIRECTCONNECT"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_DIRECTCONNECT_EMERGENCY_MAINTENANCE_SCHEDULED",
            "service": "DIRECTCONNECT"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_DIRECTCONNECT_MAINTENANCE_CANCELLED",
            "service": "DIRECTCONNECT"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_DIRECTCONNECT_MAINTENANCE_SCHEDULED",
            "service": "DIRECTCONNECT"
        },
        {
            "category": "issue",
            "code": "AWS_DIRECTCONNECT_OPERATIONAL_ISSUE",
            "service": "DIRECTCONNECT"
        },
        {
            "category": "issue",
            "code": "AWS_DMS_API_ISSUE",
            "service": "DMS"
        },
        {
            "category": "accountNotification",
            "code": "AWS_DMS_END_OF_FREE_TIER",
            "service": "DMS"
        },
        {
            "category": "issue",
            "code": "AWS_DMS_OPERATIONAL_ISSUE",
            "service": "DMS"
        },
        {
            "category": "issue",
            "code": "AWS_DS_API_ISSUE",
            "service": "DS"
        },
        {
            "category": "issue",
            "code": "AWS_DS_DEGRADED_AUTHENTICATION_PERFORMANCE",
            "service": "DS"
        },
        {
            "category": "accountNotification",
            "code": "AWS_DS_END_OF_FREE_TIER",
            "service": "DS"
        },
        {
            "category": "issue",
            "code": "AWS_DS_OPERATIONAL_ISSUE",
            "service": "DS"
        },
        {
            "category": "issue",
            "code": "AWS_DYNAMODB_API_ISSUE",
            "service": "DYNAMODB"
        },
        {
            "category": "issue",
            "code": "AWS_DYNAMODB_OPERATIONAL_ISSUE",
            "service": "DYNAMODB"
        },
        {
            "category": "issue",
            "code": "AWS_EBS_DEGRADED_EBS_VOLUME_PERFORMANCE",
            "service": "EBS"
        },
        {
            "category": "issue",
            "code": "AWS_EBS_VOLUME_LOST",
            "service": "EBS"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_API_ISSUE",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_CLASSIC_NETWORK_HEALTH_INTERNET_ISSUE",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_CLASSIC_NETWORK_HEALTH_INTER_AZ_ISSUE",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_CLASSIC_NETWORK_HEALTH_INTRA_AZ_ISSUE",
            "service": "EC2"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_EC2_DEDICATED_HOST_NETWORK_MAINTENANCE_SCHEDULED",
            "service": "EC2"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_EC2_DEDICATED_HOST_POWER_MAINTENANCE_SCHEDULED",
            "service": "EC2"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_EC2_DEDICATED_HOST_RETIREMENT_SCHEDULED",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_DNS_RESOLUTION_ISSUE",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_INSTANCE_AUTO_RECOVERY_FAILURE",
            "service": "EC2"
        },
        {
            "category": "accountNotification",
            "code": "AWS_EC2_INSTANCE_AUTO_RECOVERY_NO_ACTION",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_INSTANCE_AUTO_RECOVERY_SUCCESS",
            "service": "EC2"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_EC2_INSTANCE_NETWORK_MAINTENANCE_SCHEDULED",
            "service": "EC2"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_EC2_INSTANCE_POWER_MAINTENANCE_SCHEDULED",
            "service": "EC2"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_EC2_INSTANCE_RETIREMENT_SCHEDULED",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_INSTANCE_STORE_DRIVE_PERFORMANCE_DEGRADED",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_NETWORK_CONNECTIVITY_ISSUE",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_OPERATIONAL_ISSUE",
            "service": "EC2"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_EC2_PERSISTENT_INSTANCE_RETIREMENT_SCHEDULED",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_POWER_CONNECTIVITY_ISSUE",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_RI_MARKETPLACE_BANK_ACCOUNT_UPDATE_REQUIRED",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_VPC_NETWORK_HEALTH_INTERNET_ISSUE",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_VPC_NETWORK_HEALTH_INTER_AZ_ISSUE",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_EC2_VPC_NETWORK_HEALTH_INTRA_AZ_ISSUE",
            "service": "EC2"
        },
        {
            "category": "issue",
            "code": "AWS_ECR_API_ISSUE",
            "service": "ECR"
        },
        {
            "category": "issue",
            "code": "AWS_ECR_OPERATIONAL_ISSUE",
            "service": "ECR"
        }
    ],
    "nextToken": "****************************************************************************"
}
```

```json:結果（2回目）
{
    "eventTypes": [
        {
            "category": "issue",
            "code": "AWS_ECS_API_ISSUE",
            "service": "ECS"
        },
        {
            "category": "issue",
            "code": "AWS_ECS_OPERATIONAL_ISSUE",
            "service": "ECS"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICACHE_API_ISSUE",
            "service": "ELASTICACHE"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICACHE_INCREASED_CREATE_LATENCIES",
            "service": "ELASTICACHE"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_ELASTICACHE_MEMCACHED_MAINTENANCE_SCHEDULED",
            "service": "ELASTICACHE"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICACHE_NETWORK_CONNECTIVITY_ISSUE",
            "service": "ELASTICACHE"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICACHE_OPERATIONAL_ISSUE",
            "service": "ELASTICACHE"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_ELASTICACHE_REDIS_MAINTENANCE_SCHEDULED",
            "service": "ELASTICACHE"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICBEANSTALK_API_ISSUE",
            "service": "ELASTICBEANSTALK"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICBEANSTALK_INCREASED_PROVISIONING_TIMES",
            "service": "ELASTICBEANSTALK"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICBEANSTALK_OPERATIONAL_ISSUE",
            "service": "ELASTICBEANSTALK"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICFILESYSTEM_API_ISSUE",
            "service": "ELASTICFILESYSTEM"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICFILESYSTEM_OPERATIONAL_ISSUE",
            "service": "ELASTICFILESYSTEM"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICLOADBALANCING_API_ISSUE",
            "service": "ELASTICLOADBALANCING"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICLOADBALANCING_ENI_LIMIT_REACHED",
            "service": "ELASTICLOADBALANCING"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICLOADBALANCING_GATEWAY_NOT_ATTACHED",
            "service": "ELASTICLOADBALANCING"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICLOADBALANCING_INCREASED_PROVISIONING_LATENCIES",
            "service": "ELASTICLOADBALANCING"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICLOADBALANCING_INSUFFICIENT_IPS_IN_SUBNET",
            "service": "ELASTICLOADBALANCING"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICLOADBALANCING_NETWORK_CONNECTIVITY_ISSUE",
            "service": "ELASTICLOADBALANCING"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICLOADBALANCING_OPERATIONAL_ISSUE",
            "service": "ELASTICLOADBALANCING"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICLOADBALANCING_SECURITY_GROUP_NOT_FOUND",
            "service": "ELASTICLOADBALANCING"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICMAPREDUCE_API_ISSUE",
            "service": "ELASTICMAPREDUCE"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICMAPREDUCE_CLUSTER_LAUNCH_DELAYS",
            "service": "ELASTICMAPREDUCE"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICMAPREDUCE_INCREASED_ERROR_RATES",
            "service": "ELASTICMAPREDUCE"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICMAPREDUCE_OPERATIONAL_ISSUE",
            "service": "ELASTICMAPREDUCE"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICTRANSCODER_API_ISSUE",
            "service": "ELASTICTRANSCODER"
        },
        {
            "category": "issue",
            "code": "AWS_ELASTICTRANSCODER_OPERATIONAL_ISSUE",
            "service": "ELASTICTRANSCODER"
        },
        {
            "category": "issue",
            "code": "AWS_ES_API_ISSUE",
            "service": "ES"
        },
        {
            "category": "issue",
            "code": "AWS_ES_OPERATIONAL_ISSUE",
            "service": "ES"
        },
        {
            "category": "issue",
            "code": "AWS_ES_SCALE_UP_REQUIRED",
            "service": "ES"
        },
        {
            "category": "issue",
            "code": "AWS_EVENTS_API_ISSUE",
            "service": "EVENTS"
        },
        {
            "category": "issue",
            "code": "AWS_EVENTS_OPERATIONAL_ISSUE",
            "service": "EVENTS"
        },
        {
            "category": "issue",
            "code": "AWS_FIREHOSE_API_ISSUE",
            "service": "FIREHOSE"
        },
        {
            "category": "issue",
            "code": "AWS_FIREHOSE_INCREASED_REDSHIFT_DELIVERY_DELAYS",
            "service": "FIREHOSE"
        },
        {
            "category": "issue",
            "code": "AWS_FIREHOSE_OPERATIONAL_ISSUE",
            "service": "FIREHOSE"
        },
        {
            "category": "issue",
            "code": "AWS_GAMELIFT_API_ISSUE",
            "service": "GAMELIFT"
        },
        {
            "category": "issue",
            "code": "AWS_GAMELIFT_OPERATIONAL_ISSUE",
            "service": "GAMELIFT"
        },
        {
            "category": "issue",
            "code": "AWS_GLACIER_API_ISSUE",
            "service": "GLACIER"
        },
        {
            "category": "issue",
            "code": "AWS_GLACIER_OPERATIONAL_ISSUE",
            "service": "GLACIER"
        },
        {
            "category": "issue",
            "code": "AWS_IAM_API_ISSUE",
            "service": "IAM"
        },
        {
            "category": "issue",
            "code": "AWS_IAM_OPERATIONAL_ISSUE",
            "service": "IAM"
        },
        {
            "category": "issue",
            "code": "AWS_IAM_SAML-BASED_FEDERATED_SIGN-IN_ERRORS",
            "service": "IAM"
        },
        {
            "category": "issue",
            "code": "AWS_IMPORTEXPORT_API_ISSUE",
            "service": "IMPORTEXPORT"
        },
        {
            "category": "issue",
            "code": "AWS_IMPORTEXPORT_OPERATIONAL_ISSUE",
            "service": "IMPORTEXPORT"
        },
        {
            "category": "issue",
            "code": "AWS_INSPECTOR_API_ISSUE",
            "service": "INSPECTOR"
        },
        {
            "category": "issue",
            "code": "AWS_INSPECTOR_OPERATIONAL_ISSUE",
            "service": "INSPECTOR"
        },
        {
            "category": "issue",
            "code": "AWS_INTERNETCONNECTIVITY_API_ISSUE",
            "service": "INTERNETCONNECTIVITY"
        },
        {
            "category": "issue",
            "code": "AWS_INTERNETCONNECTIVITY_OPERATIONAL_ISSUE",
            "service": "INTERNETCONNECTIVITY"
        },
        {
            "category": "issue",
            "code": "AWS_IOT_API_ISSUE",
            "service": "IOT"
        },
        {
            "category": "issue",
            "code": "AWS_IOT_OPERATIONAL_ISSUE",
            "service": "IOT"
        },
        {
            "category": "issue",
            "code": "AWS_KINESISANALYTICS_API_ISSUE",
            "service": "KINESISANALYTICS"
        },
        {
            "category": "issue",
            "code": "AWS_KINESISANALYTICS_OPERATIONAL_ISSUE",
            "service": "KINESISANALYTICS"
        },
        {
            "category": "issue",
            "code": "AWS_KINESIS_API_ISSUE",
            "service": "KINESIS"
        },
        {
            "category": "issue",
            "code": "AWS_KINESIS_OPERATIONAL_ISSUE",
            "service": "KINESIS"
        },
        {
            "category": "issue",
            "code": "AWS_KMS_API_ISSUE",
            "service": "KMS"
        },
        {
            "category": "issue",
            "code": "AWS_KMS_OPERATIONAL_ISSUE",
            "service": "KMS"
        },
        {
            "category": "issue",
            "code": "AWS_LAMBDA_API_ISSUE",
            "service": "LAMBDA"
        },
        {
            "category": "issue",
            "code": "AWS_LAMBDA_OPERATIONAL_ISSUE",
            "service": "LAMBDA"
        },
        {
            "category": "issue",
            "code": "AWS_MACHINELEARNING_API_ISSUE",
            "service": "MACHINELEARNING"
        },
        {
            "category": "issue",
            "code": "AWS_MACHINELEARNING_OPERATIONAL_ISSUE",
            "service": "MACHINELEARNING"
        },
        {
            "category": "issue",
            "code": "AWS_MANAGEMENTCONSOLE_API_ISSUE",
            "service": "MANAGEMENTCONSOLE"
        },
        {
            "category": "issue",
            "code": "AWS_MANAGEMENTCONSOLE_OPERATIONAL_ISSUE",
            "service": "MANAGEMENTCONSOLE"
        },
        {
            "category": "issue",
            "code": "AWS_MARKETPLACE_API_ISSUE",
            "service": "MARKETPLACE"
        },
        {
            "category": "issue",
            "code": "AWS_MARKETPLACE_OPERATIONAL_ISSUE",
            "service": "MARKETPLACE"
        },
        {
            "category": "issue",
            "code": "AWS_MOBILEANALYTICS_API_ISSUE",
            "service": "MOBILEANALYTICS"
        },
        {
            "category": "issue",
            "code": "AWS_MOBILEANALYTICS_OPERATIONAL_ISSUE",
            "service": "MOBILEANALYTICS"
        },
        {
            "category": "issue",
            "code": "AWS_MOBILEHUB_OPERATIONAL_ISSUE",
            "service": "MOBILEHUB"
        },
        {
            "category": "issue",
            "code": "AWS_OPSWORKS_API_ISSUE",
            "service": "OPSWORKS"
        },
        {
            "category": "issue",
            "code": "AWS_OPSWORKS_INSTANCE_LAUNCH_COMMAND_EXECUTION_DELAYS",
            "service": "OPSWORKS"
        },
        {
            "category": "issue",
            "code": "AWS_OPSWORKS_OPERATIONAL_ISSUE",
            "service": "OPSWORKS"
        },
        {
            "category": "issue",
            "code": "AWS_RDS_API_ISSUE",
            "service": "RDS"
        },
        {
            "category": "issue",
            "code": "AWS_RDS_CONNECTIVITY_ISSUE",
            "service": "RDS"
        },
        {
            "category": "issue",
            "code": "AWS_RDS_INCREASED_CREATE_SCALING_LATENCIES",
            "service": "RDS"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_RDS_MAINTENANCE_SCHEDULED",
            "service": "RDS"
        },
        {
            "category": "issue",
            "code": "AWS_RDS_OPERATIONAL_ISSUE",
            "service": "RDS"
        },
        {
            "category": "issue",
            "code": "AWS_RDS_STORAGE_FAILURE_DB_CORRUPTION",
            "service": "RDS"
        },
        {
            "category": "issue",
            "code": "AWS_RDS_STORAGE_FAILURE_MAZ",
            "service": "RDS"
        },
        {
            "category": "issue",
            "code": "AWS_RDS_STORAGE_FAILURE_READREPLICA",
            "service": "RDS"
        },
        {
            "category": "issue",
            "code": "AWS_RDS_STORAGE_FAILURE_SAZ",
            "service": "RDS"
        },
        {
            "category": "issue",
            "code": "AWS_REDSHIFT_API_ISSUE",
            "service": "REDSHIFT"
        },
        {
            "category": "issue",
            "code": "AWS_REDSHIFT_CONNECTIVITY_ISSUE",
            "service": "REDSHIFT"
        },
        {
            "category": "issue",
            "code": "AWS_REDSHIFT_INCREASED_CREATE_LATENCIES",
            "service": "REDSHIFT"
        },
        {
            "category": "issue",
            "code": "AWS_REDSHIFT_OPERATIONAL_ISSUE",
            "service": "REDSHIFT"
        },
        {
            "category": "issue",
            "code": "AWS_RISK_CREDENTIALS_COMPROMISED",
            "service": "RISK"
        },
        {
            "category": "issue",
            "code": "AWS_RISK_CREDENTIALS_COMPROMISE_SUSPECTED",
            "service": "RISK"
        },
        {
            "category": "issue",
            "code": "AWS_RISK_CREDENTIALS_EXPOSED",
            "service": "RISK"
        },
        {
            "category": "issue",
            "code": "AWS_RISK_CREDENTIALS_EXPOSURE_SUSPECTED",
            "service": "RISK"
        },
        {
            "category": "issue",
            "code": "AWS_ROUTE53DOMAINREGISTRATION_API_ISSUE",
            "service": "ROUTE53DOMAINREGISTRATION"
        },
        {
            "category": "issue",
            "code": "AWS_ROUTE53DOMAINREGISTRATION_OPERATIONAL_ISSUE",
            "service": "ROUTE53DOMAINREGISTRATION"
        },
        {
            "category": "issue",
            "code": "AWS_ROUTE53PRIVATEDNS_API_ISSUE",
            "service": "ROUTE53PRIVATEDNS"
        },
        {
            "category": "issue",
            "code": "AWS_ROUTE53PRIVATEDNS_OPERATIONAL_ISSUE",
            "service": "ROUTE53PRIVATEDNS"
        },
        {
            "category": "issue",
            "code": "AWS_ROUTE53_API_ISSUE",
            "service": "ROUTE53"
        },
        {
            "category": "issue",
            "code": "AWS_ROUTE53_DOMAIN_REGISTRATION_TRANSFER_ERROR_RATE",
            "service": "ROUTE53"
        },
        {
            "category": "issue",
            "code": "AWS_ROUTE53_IDENTITY_PROOF_REQUIRED",
            "service": "ROUTE53"
        },
        {
            "category": "issue",
            "code": "AWS_ROUTE53_NEW_INSTANCES_PRIVATE_DNS_RESOLUTION",
            "service": "ROUTE53"
        },
        {
            "category": "issue",
            "code": "AWS_ROUTE53_OPERATIONAL_ISSUE",
            "service": "ROUTE53"
        },
        {
            "category": "issue",
            "code": "AWS_ROUTE53_SLOW_PROPAGATION_HEALTH_CHECK_STATUSES",
            "service": "ROUTE53"
        },
        {
            "category": "issue",
            "code": "AWS_ROUTE53_SLOW_PROPAGATION_TIMES",
            "service": "ROUTE53"
        },
        {
            "category": "issue",
            "code": "AWS_S3_API_ISSUE",
            "service": "S3"
        },
        {
            "category": "issue",
            "code": "AWS_S3_OPERATIONAL_ISSUE",
            "service": "S3"
        }
    ],
    "nextToken": "****************************************************************************"
}
```

```json:結果（3回目）
{
    "eventTypes": [
        {
            "category": "issue",
            "code": "AWS_SDB_API_ISSUE",
            "service": "SDB"
        },
        {
            "category": "issue",
            "code": "AWS_SDB_OPERATIONAL_ISSUE",
            "service": "SDB"
        },
        {
            "category": "accountNotification",
            "code": "AWS_SECURITY_NOTIFICATION",
            "service": "SECURITY"
        },
        {
            "category": "issue",
            "code": "AWS_SERVICECATALOG_API_ISSUE",
            "service": "SERVICECATALOG"
        },
        {
            "category": "issue",
            "code": "AWS_SERVICECATALOG_OPERATIONAL_ISSUE",
            "service": "SERVICECATALOG"
        },
        {
            "category": "issue",
            "code": "AWS_SES_API_ISSUE",
            "service": "SES"
        },
        {
            "category": "accountNotification",
            "code": "AWS_SES_DKIM_FAILED_TO_VERIFIED",
            "service": "SES"
        },
        {
            "category": "issue",
            "code": "AWS_SES_DKIM_PENDING_TO_FAILED",
            "service": "SES"
        },
        {
            "category": "accountNotification",
            "code": "AWS_SES_DKIM_PENDING_TO_VERIFIED",
            "service": "SES"
        },
        {
            "category": "issue",
            "code": "AWS_SES_DKIM_VERIFIED_TO_FAILED",
            "service": "SES"
        },
        {
            "category": "issue",
            "code": "AWS_SES_OPERATIONAL_ISSUE",
            "service": "SES"
        },
        {
            "category": "issue",
            "code": "AWS_SES_VERIFICATION_PENDING_TO_FAILED",
            "service": "SES"
        },
        {
            "category": "accountNotification",
            "code": "AWS_SES_VERIFICATION_PENDING_TO_SUCCESS",
            "service": "SES"
        },
        {
            "category": "issue",
            "code": "AWS_SNS_API_ISSUE",
            "service": "SNS"
        },
        {
            "category": "issue",
            "code": "AWS_SNS_OPERATIONAL_ISSUE",
            "service": "SNS"
        },
        {
            "category": "issue",
            "code": "AWS_SQS_API_ISSUE",
            "service": "SQS"
        },
        {
            "category": "issue",
            "code": "AWS_SQS_OPERATIONAL_ISSUE",
            "service": "SQS"
        },
        {
            "category": "issue",
            "code": "AWS_STORAGEGATEWAY_API_ISSUE",
            "service": "STORAGEGATEWAY"
        },
        {
            "category": "issue",
            "code": "AWS_STORAGEGATEWAY_INCREASED_ERROR_RATES",
            "service": "STORAGEGATEWAY"
        },
        {
            "category": "issue",
            "code": "AWS_STORAGEGATEWAY_OPERATIONAL_ISSUE",
            "service": "STORAGEGATEWAY"
        },
        {
            "category": "issue",
            "code": "AWS_SWF_API_ISSUE",
            "service": "SWF"
        },
        {
            "category": "issue",
            "code": "AWS_SWF_OPERATIONAL_ISSUE",
            "service": "SWF"
        },
        {
            "category": "issue",
            "code": "AWS_VPC_API_ISSUE",
            "service": "VPC"
        },
        {
            "category": "issue",
            "code": "AWS_VPC_CONNECTIVITY_ISSUE",
            "service": "VPC"
        },
        {
            "category": "issue",
            "code": "AWS_VPC_INCREASED_MANAGEMENT_CONSOLE_ERROR_RATES",
            "service": "VPC"
        },
        {
            "category": "issue",
            "code": "AWS_VPC_OPERATIONAL_ISSUE",
            "service": "VPC"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_VPN_EMERGENCY_MAINTENANCE_SCHEDULED",
            "service": "VPN"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_VPN_MAINTENANCE_CANCELLED",
            "service": "VPN"
        },
        {
            "category": "scheduledChange",
            "code": "AWS_VPN_MAINTENANCE_SCHEDULED",
            "service": "VPN"
        },
        {
            "category": "issue",
            "code": "AWS_WAF_API_ISSUE",
            "service": "WAF"
        },
        {
            "category": "issue",
            "code": "AWS_WAF_OPERATIONAL_ISSUE",
            "service": "WAF"
        },
        {
            "category": "issue",
            "code": "AWS_WORKDOCS_API_ISSUE",
            "service": "WORKDOCS"
        },
        {
            "category": "issue",
            "code": "AWS_WORKDOCS_OPERATIONAL_ISSUE",
            "service": "WORKDOCS"
        },
        {
            "category": "issue",
            "code": "AWS_WORKMAIL_API_ISSUE",
            "service": "WORKMAIL"
        },
        {
            "category": "issue",
            "code": "AWS_WORKMAIL_DELAYED_EMAIL_DELIVERY",
            "service": "WORKMAIL"
        },
        {
            "category": "issue",
            "code": "AWS_WORKMAIL_OPERATIONAL_ISSUE",
            "service": "WORKMAIL"
        },
        {
            "category": "issue",
            "code": "AWS_WORKSPACES_API_ISSUE",
            "service": "WORKSPACES"
        },
        {
            "category": "issue",
            "code": "AWS_WORKSPACES_CONNECTIVITY_ISSUE",
            "service": "WORKSPACES"
        },
        {
            "category": "issue",
            "code": "AWS_WORKSPACES_OPERATIONAL_ISSUE",
            "service": "WORKSPACES"
        }
    ]
}
```

まず、イベントは以下のcategoryに分類されているようです。

- issue
- scheduledChange
- accountNotification

issueは、これまで[Service Health Dashboard](http://status.aws.amazon.com/)で提供されていた情報はほぼ含まれているように思います。（未確認）

issueには、見慣れない「RISK」というServiceのイベントが定義されています。
Codeの部分を読む限り、クレデンシャルお漏らし検知ってことでしょうか？ｗ
だれか教えてください！

scheduledChangeは、ホストのリタイアメントなどですね。
ホストのリタイアメントは、これまでだと「AWSアカウントとして設定したメールアドレスへの通知」や「EC2やRDSなどサービス毎のAPIで確認」していたものですが、healthでまとめて状況確認が可能になるのでいろいろ捗りそうです。

accountNotificationもいろいろ検知できますね。
支払の遅延やセキュリティに関する問題、EC2のAutoRecoveryの不発？など、いろいろ検知できそうです。

見てもらえれば分かりますが、これは便利ですねー。
安心感ある。


## 今どんなイベントが発生しているのか？

現在発生しているイベントの一覧を表示してみます。

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

```json:結果
{
    "events": [
        {
            "lastUpdatedTime": 1479766174.0,
            "service": "EC2",
            "eventTypeCode": "AWS_EC2_OPERATIONAL_ISSUE",
            "startTime": 1479764702.0,
            "eventTypeCategory": "issue",
            "endTime": 1479766174.0,
            "region": "us-west-2",
            "arn": "arn:aws:health:us-west-2::event/AWS_EC2_OPERATIONAL_ISSUE_1479766173",
            "statusCode": "closed"
        }
    ]
}
```

```bash:コマンド
date --date "@1479764702.0"
date --date "@1479766174.0"
```

```text:結果
Mon Nov 21 21:45:02 UTC 2016
Mon Nov 21 22:09:34 UTC 2016
```

先月、OregonリージョンのEC2で何かあったようです。


イベントの詳細は、以下のコマンドで確認可能です。

```bash:コマンド
aws health describe-event-details \
    --event-arns "arn:aws:health:us-west-2::event/AWS_EC2_OPERATIONAL_ISSUE_1479766173"
```

```json:結果
{
    "failedSet": [],
    "successfulSet": [
        {
            "event": {
                "lastUpdatedTime": 1479766174.0,
                "service": "EC2",
                "eventTypeCode": "AWS_EC2_OPERATIONAL_ISSUE",
                "startTime": 1479764702.0,
                "eventTypeCategory": "issue",
                "endTime": 1479766174.0,
                "region": "us-west-2",
                "arn": "arn:aws:health:us-west-2::event/AWS_EC2_OPERATIONAL_ISSUE_1479766173",
                "statusCode": "closed"
            },
            "eventDescription": {
                "latestDescription": "[RESOLVED] Increased Launch Error Rates\n2016-11-21T21:45:02Z We are investigating increased error rates for new instance launches in the US-WEST-2 Region.\n2016-11-21T22:09:34Z Between 1:16 PM and 2:04 PM PST we experienced increased error rates for some APIs and new instance launches in the US-WEST-2 Region. The issue has been resolved and the service is operating normally.\n"
            }
        }
    ]
}
```

新しいインスタンスの起動に失敗するケースが増加していたようです。


## イベントの影響を受けたエンティティ（EC2インスタンスなどのリソース）を確認する方法

以下のコマンドで確認可能です。

```bash:コマンド
aws health describe-affected-entities \
    --filter eventArns="arn:aws:health:us-west-2::event/AWS_EC2_OPERATIONAL_ISSUE_1479766173"
```

```json:結果
{
    "entities": [
        {
            "entityValue": "UNKNOWN",
            "eventArn": "arn:aws:health:us-west-2::event/AWS_EC2_OPERATIONAL_ISSUE_1479766173",
            "lastUpdatedTime": 1479766174.0
        }
    ]
}
```

entityValueがUNKNOWNなので、影響を受けたエンティティは無い、ということでしょうか。


## その他

その他、イベントやイベントの影響を受けたエンティティを表示するコマンドの提供されています。
（検証したアカウントではいい感じの実行結果が出ませんでした。）

```bash:コマンド
aws health describe-entity-aggregates
```

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

```bash:コマンド
aws health describe-event-aggregates \
    --aggregate-field "eventTypeCategory"
```

```json:結果
{
    "eventAggregates": [
        {
            "count": 1,
            "aggregateValue": "issue"
        }
    ]
}
```


# 実際の使い方

Management Consoleからの現状確認が、まずは基本的な使い方になるかと思います。

また、Cloud Watch Eventsのイベントソースに指定できるようなので、これを利用して通知や自動復旧を行うこともできると思います。

![CloudWatch Management Console.png](https://qiita-image-store.s3.amazonaws.com/0/36230/284f2d95-e6ff-76dd-63b2-f47e9d7734d3.png)

# 所感

管理者が認識すべきイベントはおおよそ網羅されていそうで、Eventsとの連携で運用はかなりやりやすくなるのではないかと思います。

とりあえず、通知だけでもすぐにはじめてみようと思いました。