-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 Lambda - "list_coverage" filter on lambdaFunctionRuntime
not working
#4224
Comments
Thanks for reaching out. Here are the available Boto3 paginators for Lambda: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/lambda.html#paginators . Note there is no Also if you could share debug logs (with any sensitive info redacted) by adding |
It looks like you're probably trying to use this import boto3
client = boto3.client('inspector2')
paginator = client.get_paginator('list_coverage')
response_iterator = paginator.paginate(
filterCriteria={
'resourceType': [
{
'comparison': 'EQUALS',
'value': 'AWS_LAMBDA_FUNCTION'
},
],
'lambdaFunctionRuntime': [
{
'comparison': 'EQUALS',
'value': 'PYTHON_3_9'
},
{
'comparison': 'EQUALS',
'value': 'PYTHON_3_8'
},
]
}
)
for page in response_iterator:
print(page) |
Hello @tim-finnigan, thanks for your quick answer. |
@RegisGraptin thanks for confirming. Can you share the full code snippet you're using, along with debug logs (with any sensitive info redacted) by adding |
@tim-finnigan there it is Show logs
|
Thanks for following up. It looks like the
Results in:
I'll try reaching out to the Inspector team for more info regarding this behavior, as it is an issue with the API filters/response rather than the Boto3 SDK directly. |
We heard back from the service team who acknowledged the issue and is working on a fix. |
We were informed that the fix is currently being deployed. Once the API fix is released, then the filter should be working. |
Upon testing I can confirm that this filter issue now appears resolved on the API side, so the correct results should be returning for you. If you're still seeing any incorrect results please let us know, otherwise I think this can be closed as resolved. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
I am currently using AWS Lambda to retrieve the Lambda Function from AWS. I would like to apply a filter on it using the
lambdaFunctionRuntime
. However, when applying it, it seems the filter is not taken into consideration. For instance, I have the following filters (that I am using infilterCriteria
for thelist_coverage
function):However, when using it, I have a bunch of lambda resource with different runtime as node and other python version.
Expected Behavior
By applying the filter, I should only have lambda function resource with the runtime matching the configuration.
If I took my previous example, in the API response, we should have
PYTHON_3_9
andPYTHON_3_8
.Current Behavior
Currently, it seems the filter is not working for the
list_coverage
function on thelambdaFunctionRuntime
.Reproduction Steps
Possible Solution
I think it is related to the API endpoint, not taking into consideration this filter.
Additional Information/Context
No response
SDK version used
1.34.111
Environment details (OS name and version, etc.)
Ubuntu - Python 3.12.3
The text was updated successfully, but these errors were encountered: