File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed
reference-artifacts/Custom-Scripts/lza-upgrade/src/snapshot/lib Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import {
2020 LogGroup ,
2121 MetricFilter ,
2222 SubscriptionFilter ,
23+ LogGroupClass ,
2324} from '@aws-sdk/client-cloudwatch-logs' ;
2425import { AwsCredentialIdentity } from '@aws-sdk/types' ;
2526
@@ -170,19 +171,21 @@ export async function snapshotCloudWatchLogResources(
170171 } ) ;
171172 }
172173
174+ if ( logGroup . logGroupClass && logGroup . logGroupClass !== LogGroupClass . INFREQUENT_ACCESS ) {
173175 //get subscription filters
174- const subscriptionFilterResults = await describeSubscriptionFilters (
175- logGroup . logGroupName ! ,
176- region ,
177- credentials ,
178- ) ;
179- await snapshotTable . writeResource ( {
180- accountId : accountId ,
181- region : region ,
182- resourceName : `subscription-filters-${ logGroup . logGroupName ! } ` ,
183- preMigration : preMigration ,
184- data : subscriptionFilterResults ,
185- } ) ;
176+ const subscriptionFilterResults = await describeSubscriptionFilters (
177+ logGroup . logGroupName ! ,
178+ region ,
179+ credentials ,
180+ ) ;
181+ await snapshotTable . writeResource ( {
182+ accountId : accountId ,
183+ region : region ,
184+ resourceName : `subscription-filters-${ logGroup . logGroupName ! } ` ,
185+ preMigration : preMigration ,
186+ data : subscriptionFilterResults ,
187+ } ) ;
188+ }
186189 }
187190 }
188191 } while ( nextToken ) ;
You can’t perform that action at this time.
0 commit comments