0

If you look at the following link: http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_ES_Stream.html, there is a mechanism to associate a log group with an elastic search domain. Do you know this can be done via the java aws sdk so that it can be automated in a running application?

1 Answers1

1

Assuming the EC domain is already created.

  1. Create IAM role that allows Cloudwatch logs access to ES.

    {
    "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

strongjz
  • 4,271
  • 1
  • 17
  • 27