aws / aws-cli

Universal Command Line Interface for Amazon Web Services
Other
15.48k stars 4.11k forks source link

AWS ResourceGroupTagging is not listing lambdas that does not have tags #4632

Closed selva-cat closed 4 years ago

selva-cat commented 4 years ago

I have created two lambdas one with tags and other without tags at all. lambda 1=> function:helloWorld lambda 2=> function:lambdatest(tags=> {"value": "name", "Key": "lambda-console:blueprint"})

aws resourcegroupstaggingapi get-resources --resource-type-filters lambda

output: 
{
    [
        {
            "ResourceARN": "arn:aws:lambda:us-east-2:xxxxxxxxxxxx:function:lambdatest", 
            "Tags": [
                {
                    "Value": "name", 
                    "Key": "lambda-console:blueprint"
                }
            ]
        }
    ]
}

while running resourcegrouptagging api cmd above, I get only one lambda function name that has tag details.

After adding tags in "function:helloWorld" lambda, and executing the cli cmd again,

aws resourcegroupstaggingapi get-resources --resource-type-filters lambda

{
    [
        {
            "ResourceARN": "arn:aws:lambda:us-east-2:yyyyyyyyyyyy:function:helloWorld", 
            "Tags": [ 
            {
                "Value": "super", 
                   "Key": "Owner"
            }]
        }, 
        {
            "ResourceARN": "arn:aws:lambda:us-east-2:xxxxxxxxxxxx:function:lambdatest", 
            "Tags": [
                {
                    "Value": "name", 
                    "Key": "lambda-console:blueprint"
                }
            ]
        }
    ]
}

Q1: Need to know why it doesn't fetch the lambda "function:helloWorld" that didn't have tags initially?

Q2: Is the tag object-param is initially null?

Observation: After removing all tags from lambda and running the same cmd retrieves the lambda that has empty tags as well.

Kindly help. Thanks in Advance.

kdaily commented 4 years ago

Hi @selva-cat, if this issue is still occurring for you, can you please provide the output of the commands with debug output turned on (aws --debug)? Thanks!

github-actions[bot] commented 4 years ago

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.