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.

IdentityStore list_users not working inside the lambda function

See original GitHub issue

Describe the bug

I am trying to list all the Identitystores(AWS SSO) users , When I run code in ipython or python file in laptop it’s showing all the user info like UserName,UserId, Name, Emails and UserType. But When I run same code in Lambda function its showing only UserName and UserId. Here is my code

`response = client.list_users( IdentityStoreId=‘d-9xxxxxxxxx’

) print(response) `

###Response

{ 'Users': [ { 'UserName': 'user', 'UserId': '3xxxxx-7011-70be-89a3-xxxxxxx', 'Name': { 'FamilyName': 'User', 'GivenName': 'A' }, 'DisplayName': 'User A', 'Emails': [ { 'Value': 'user@gmail.com', 'Type': 'work', 'Primary': True } ], 'UserType': 'Developer', 'Title': 'Senior Developer', 'IdentityStoreId': 'd-9xxxxxxxxx' } ]

Same code run in lambda and response is like this

{ 'Users': [ { 'UserName': 'user', 'UserId': '3xxxxx-7011-70be-89a3-xxxxxxxx' } ], }

Python lambda runtime : 3.8 Boto3 Version inside python lambda runtime : boto3==1.24.59 Local boto3 runtime : boto3==1.24.59

Expected Behavior

Expecting output

{ 'Users': [ { 'UserName': 'user', 'UserId': '3xxxxx-7011-70be-89a3-xxxxxxx', 'Name': { 'FamilyName': 'User', 'GivenName': 'A' }, 'DisplayName': 'User A', 'Emails': [ { 'Value': 'user@gmail.com', 'Type': 'work', 'Primary': True } ], 'UserType': 'Developer', 'Title': 'Senior Developer', 'IdentityStoreId': 'd-9xxxxxxxxx' } ]

Current Behavior

{ 'Users': [ { 'UserName': 'user', 'UserId': '3xxxxx-7011-70be-89a3-xxxxxxxx' } ], }

Reproduction Steps

response = client.list_users( IdentityStoreId=‘d-9xxxxxxxxx’

) print(response)

Deployed in lambda

Possible Solution

No response

Additional Information/Context

No response

SDK version used

1.24.59

Environment details (OS name and version, etc.)

python3.8 lambda runtime,

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
tim-finnigancommented, Sep 14, 2022

Glad to hear that, thanks for letting us know! I’ll go ahead and close this issue.

0reactions
tilakthimmappacommented, Sep 14, 2022

Thank you so much now it’s working with boto3=>1.24.72

Read more comments on GitHub >

github_iconTop Results From Across the Web

lambda - user is not authorized to perform: cognito-idp:ListUsers
Go to IAM console -> Policies -> Create Policy. Choose "Cognito User Pools" Services. Specify the desired actions for which you need permission ......
Read more >
Operation Summary - AWS SDK for PHP 3.x - Amazon.com
This page describes the parameters and results for the operations of the AWS SSO Identity Store (2020-06-15), and shows how to use the ......
Read more >
Can't access userAttributes of listUsersRes.Users in AWS ...
I'm filtering out unconfirmed emails in lambda function. I jsut want to access email of every user in my listUsersRes.Users. I have tried...
Read more >
aws_lambda_function | Resources | hashicorp/aws
The Lambda Function itself includes source code and runtime configuration. ... "test_lambda" { # If the file is not in the current working...
Read more >
How to migrate your Node.js Lambda functions to AWS SDK v3
serverless | grep .zip . Note that all the following steps were required for v3.0.0 of the SDK. Some of the issues I...
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