How do I create an OpenSearch subscription for CloudWatch using the API?

0

It's possible to stream CloudWatch logs to OpenSearch. The process of setting up the subscription via the UI ids described here: https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_OpenSearch_Stream.html. Is there a way of setting this up using the API or CloudFormation? It's not listed as an option here: https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_PutSubscriptionFilter.html

1 Risposta
0

I recommend taking a look at sample CloudFormation templates such as this one and another one here. When you create a subscription to stream logs to OpenSearch, a Lambda function is used to stream logs. Therefore, there is no single API to set up the subscription. Instead, you will need to create a subscription with a destination set for Lambda.

AWS
Taka_M
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande