By using AWS re:Post, you agree to the Terms of Use

AWS CloudWatch metrics to OpenSearch


I'm working on Centralized Logging of my environnement AWS presented in this guide:

I'm using the same architecture as presented in AWS Doc.

I'm searching the possibility to send metrics from CloudWatch of each account to OpenSearch in centralized account. I was thinking of a Lambda function that retrieves each X minutes the data with get_metric_data ? I'm collecting the metrics with CloudWatch Agent

Is there an another method to do it ?

Thank you

2 Answers

CloudWatch Metric Streams is the easiest way to continually get metric data sent out of an account.

In your case, the simplest setup for that would be to send from your accounts to a central S3 bucket in your central account. From there you can have a Lambda that triggers whenever S3 files get uploaded to the bucket - read those S3 files and log the content to the Lambda's log output as EMF - a simple JSON format that creates metrics.

So pipeline is basically: remote account -> Metric Stream -> central account S3 bucket -> Lambda -> CW Logs as EMF -> CW Metrics

answered 6 months ago
  • @Amazon-CloudWatch-01 Thank you for your response ! As far as I know, it isn't possible to make a Metric Stream which streams to a S3 bucket in another account. Isn't it ?


There is an opensource projects which sends all CW metrics and logs for your Amazon OpenSearch Service deployment to a centralized opensearch. Have a look at this and see if this helps:

answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions