Box API call from AWS Lambda using python sdk
回答済みHi,
I'm trying to get box users information from aws lambda. However, I've been getting an error, and not sure what to do since I don't have much knowledge on this. Following is the code:
from boxsdk import JWTAuth
from boxsdk import Client
import boto3
import os
def lambda_handler(event, context):
*******
*******
*******
*******
*******
print(lst)
auth = JWTAuth.from_settings_file('/tmp/config.json')
access_token = auth.authenticate_instance()
client = Client(auth)
users = client.users(user_type='all')
for user in users:
if user.login =="demo_user_login":
print(user.id)
error:
I have installed boxsdk, boxsdk[jwt] in the directory. If anyone could help with would be great and appreciable. Please let me know if any clarification is needed.
Thank you!
-
HI
I think this is a python issue mainly. Maybe check these articles where other users have run into similar issues
Rgds
Peter Christensen, Platform Solutions Engineer, Box
投稿コメントは受け付けていません。
コメント
2件のコメント