Skip to content

logGroupNamePattern field in DescribeLogGroupsCommand (SDK v3) does not filter correctly #5255

@covertbert

Description

@covertbert

Checkboxes for prior research

Describe the bug

Since trying to update my application from using v2 of the SDK to v3, the logGroupNamePattern field for DescribeLogGroupsCommand returns log groups that do not match the given string

SDK version number

@aws-sdk/client-cloudwatch-logs 3.418.0

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

NodeJS v18.18.0

Reproduction Steps

Using the following code in an environment where there are log groups that match the given pattern and also log groups that do not:

new DescribeLogGroupsCommand({
  logGroupNamePattern: '-ephemeral-',
})

Observed Behavior

The log groups with the following names are returned:

/aws/lambda/diego-sit-event
/aws/lambda/diego-sit-updateMongodbIndexes
/aws/lambda/diego-uat-api
/aws/lambda/diego-uat-direct

Expected Behavior

I would expect none of the following log group names to be returned:

/aws/lambda/diego-sit-event
/aws/lambda/diego-sit-updateMongodbIndexes
/aws/lambda/diego-uat-api
/aws/lambda/diego-uat-direct

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.closed-for-stalenessp2This is a standard priority issuev2-v3-inconsistencyBehavior has changed from v2 to v3, or feature is missing altogether

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions