Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS plugin: IgnoreConfig codes are not functioning as expected #764

Open
bigdatasourav opened this issue Mar 7, 2024 · 1 comment
Open
Assignees

Comments

@bigdatasourav
Copy link

IgnoreConfig codes are not working as expected which resulted in unnecessary logs.

Sample query:

select * from aws_ecr_image_scan_finding where repository_name = 'abc' and image_tag = '2.1'

In the table below is the list config -

List: &plugin.ListConfig{
			Hydrate: listAwsEcrImageScanFindings,
			Tags:    map[string]string{"service": "ecr", "action": "DescribeImageScanFindings"},
			IgnoreConfig: &plugin.IgnoreConfig{
				ShouldIgnoreErrorFunc: shouldIgnoreErrors([]string{"RepositoryNotFoundException", "ImageNotFoundException", "ScanNotFoundException"}),
			},
			KeyColumns: []*plugin.KeyColumn{
				{Name: "repository_name", Require: plugin.Required},
				{Name: "image_tag", Require: plugin.Required},
			},
		},

log output: (Even though RepositoryNotFoundException is already placed in IgnoreConfig)

2024-03-07 13:21:30.281 UTC [ERROR] steampipe-plugin-aws.plugin: [ERROR] 1709817689522: aws_ecr_image_scan_finding.listAwsEcrImageScanFindings: api_error="operation error ECR: DescribeImageScanFindings, https response error StatusCode: 400, RequestID: 576ab62f-9090-4af0-8420-fccd9af474ae, RepositoryNotFoundException: The repository with name 'abc' does not exist in the registry with id '1323443245'"

@captainfalcon23
Copy link

As I mentioned in the original issue, the issue isn’t just about logs in a log file. It’s about steampipe inefficiency of querying every account and region in an aggregation instead of smartly hydrating the tables from parents. If the context is there that an image belongs to account X in region Y, I don’t understand why steampipe can’t use that context to query the appropriate connection for further info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants