简体   繁体   中英

Configure cloudwatch -> elastic search through java code

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM