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 Antwort
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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen