You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: Only the first 100 resources will be returned. If your stack has more resources than this, you should use ListStackResources instead.
So only the first 100 resources in a stack get considered for tagging. If the stack has more than 100 resources, it's pretty much random if the log groups are returned within the first 100, and if they are returned, then they will get the tags, and if they do not fit into the 100, then they're ignored and no tags are set.
If an SLS / CloudFormation stack has many resources (more than 100), this plugin will not reliably set CloudWatch log group tags.
The root cause is this:
serverless-tag-cloud-watch-logs/index.js
Lines 48 to 55 in 8fae6c0
Quoting the AWS SDK documentation for CloudFormation.describeStackResources:
So only the first 100 resources in a stack get considered for tagging. If the stack has more than 100 resources, it's pretty much random if the log groups are returned within the first 100, and if they are returned, then they will get the tags, and if they do not fit into the 100, then they're ignored and no tags are set.
Proposed solution:
As hinted by CloudFormation.describeStackResources documentation, we should use CloudFormation.listStackResources here instead.
The text was updated successfully, but these errors were encountered: