Skip to content
This repository was archived by the owner on Dec 31, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,14 @@ export const isThrottlingError = (
e.code === 'EPIPE' ||
e.code === 'ETIMEDOUT' ||
e.code === 'ENOTFOUND' ||
e.code === 'RequestLimitExceeded' ||
// SDKv3 Error Structure
e.name === 'ConcurrentModificationException' || // Retry for AWS Organizations
e.name === 'InsufficientDeliveryPolicyException' || // Retry for ConfigService
e.name === 'NoAvailableDeliveryChannelException' || // Retry for ConfigService
e.name === 'ConcurrentModifications' || // Retry for AssociateHostedZone
e.name === 'LimitExceededException' || // Retry for SecurityHub
e.name === 'RequestLimitExceeded' ||
e.name === 'OperationNotPermittedException' || // Retry for RAM
e.name === 'TooManyRequestsException' ||
e.name === 'Throttling' ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
LogGroup,
MetricFilter,
SubscriptionFilter,
LogGroupClass
} from '@aws-sdk/client-cloudwatch-logs';
import { AwsCredentialIdentity } from '@aws-sdk/types';

Expand Down Expand Up @@ -159,7 +160,7 @@ export async function snapshotCloudWatchLogResources(
});

//get metric filters
if (logGroup.metricFilterCount! > 0) {
if (logGroup.metricFilterCount! > 0 && logGroup.logGroupClass == LogGroupClass.STANDARD) {
const metricFilterResults = await describeMetricFilters(logGroup.logGroupName!, region, credentials);
await snapshotTable.writeResource({
accountId: accountId,
Expand All @@ -170,19 +171,21 @@ export async function snapshotCloudWatchLogResources(
});
}

//get subscription filters
const subscriptionFilterResults = await describeSubscriptionFilters(
logGroup.logGroupName!,
region,
credentials,
);
await snapshotTable.writeResource({
accountId: accountId,
region: region,
resourceName: `subscription-filters-${logGroup.logGroupName!}`,
preMigration: preMigration,
data: subscriptionFilterResults,
});
if (logGroup.logGroupClass == LogGroupClass.STANDARD) {
//get subscription filters
const subscriptionFilterResults = await describeSubscriptionFilters(
logGroup.logGroupName!,
region,
credentials,
);
await snapshotTable.writeResource({
accountId: accountId,
region: region,
resourceName: `subscription-filters-${logGroup.logGroupName!}`,
preMigration: preMigration,
data: subscriptionFilterResults,
});
}
}
}
} while (nextToken);
Expand Down
Loading