回答

1

假設EC域已被創建。

  1. 創建允許Cloudwatch日誌訪問ES的IAM角色。

    { 
    "Version": "2012-10-17", 
    
    "Statement": [ 
        { 
         "Action": [ 
          "es:*" 
         ], 
         "Effect": "Allow", 
         "Resource": "arn:aws:es:us-west-2:123456789012:domain/streaming-logs/*" 
        } 
        ] 
    
    } 
    
  2. Create the log group

  3. Create the Subscription filter