question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IAM Client: User tags

See original GitHub issue

I get an error when I try to do:

import boto3

client = boto3.client('iam')
print client.list_user_tags(UserName='username')

AttributeError: ‘IAM’ object has no attribute ‘list_user_tags’

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13

github_iconTop GitHub Comments

3reactions
Talanorcommented, Jan 8, 2019

For the record, because I found this issue while searching for it, I can concur with @niugit. Locally it works, but aws lambda seem to behave differently:

iam = boto3.client("iam")
attrs = [x for x in dir(iam) if "tag" in x]
print(attrs)

localy:

['list_role_tags', 'list_user_tags', 'tag_role', 'tag_user', 'untag_role', 'untag_user']

Which is consistent with boto’s documentation. on AWS Lambda:

[]

Which is not. Both sides use boto3-1.9.42.

I opened a ticket with AWS in order to know where it comes from and will update this post with the solution / workaround.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tagging IAM users - AWS Identity and Access Management
Managing tags on IAM users (console) · In the navigation pane of the console, choose Users and then choose the name of the...
Read more >
IAM — Boto 3 Docs 1.9.96 documentation - Amazon AWS
A list of tags that you want to attach to the newly created role. Each tag consists of a key name and an...
Read more >
IAM User Tag, Indexing Possible Using Boto3 - Stack Overflow
import boto3 client = boto3.client('iam') users = client.list_users() ... gets IAM tags def lambda_handler(event,context): for user in ...
Read more >
Method: Aws::IAM::Client#tag_policy — Documentation for aws-sdk ...
Adds one or more tags to an IAM customer managed policy. If a tag with the same key name already exists, then that...
Read more >
Tags and access control | IAM Documentation - Google Cloud
Overview of tags. A tag is a key-value pair that is attached to a Google Cloud resource. You can conditionally grant IAM roles...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found