Can wildcards be used to specify log groups in the CreateExportTask API for CloudWatch Logs?

Can wildcards be used to specify log groups in the CreateExportTask API for CloudWatch Logs?

2024.10.29

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

日本語版はこちら

The issue

I am considering a method to export CloudWatch Logs using the CreateExportTask API.

Since there are multiple log groups I want to export, I would like to specify them all at once, but can wildcards be used to specify log groups in the CreateExportTask API?

The solution

No, wildcards cannot be used.

In the request parameter "logGroupName" of the CreateExportTask API, the following patterns can be defined, but wildcards (*) are not included.

AWS official documentation

Pattern: [.-_/#A-Za-z0-9]+

Since wildcards cannot be used, please consider specifying each log group name in multiple schedules.

Also, please note that there is a quota of one export task per account, so concurrent execution is not possible.

Therefore, you need to execute tasks at intervals.

AWS official documentation

Export task
One active (running or pending) export task at a time, per account. This quota can't be changed.

Note

Since continuous log archiving using the CreateExportTask API is deprecated, please consider using subscriptions if continuous archiving is required.
CreateExportTask - Amazon CloudWatch Logs

We recommend that you don't regularly export to Amazon S3 as a way to continuously archive your logs. For that use case, we instaed recommend that you use subscriptions.

References


AWSテクニカルサポートノートについて

過去にクラスメソッドのAWS総合支援サービスで頂いたお問合せの中から、通常のAWS利用時でも有益になりうる情報をテクニカルサポートチームがTIPSとしてご紹介しています。技術サポートは、無料でご提供しております。詳細は下記ボタンからご覧ください。

クラスメソッドのAWSサポートの詳細を見る

この記事をシェアする

AWSのお困り事はクラスメソッドへ

関連記事