AWS Transfer Family client returns an error with no function list_profiles in Lambda but code runs fine locally

0

When trying to grab the profiles from the AWS Transfer family client, it returns an error saying 'Transfer' object has no attribute 'list_profiles'. However, the same code works fine when I run it locally. It's only in AWS Lambda does it fail. I thought it might've been a permissions issue but the role has full access to Transfer Family. It also has no issues running other functions like describe_server or list_tags_for_resource so it's not like the client is somehow missing.

client = boto3.client(service_name = 'transfer', region_name = region)
response = client.list_profiles()

By the way, I tested it with other profile functions like describe_profile and the same issue with the attribute not existing happens. Here's the documentation I was following: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/transfer.html#Transfer.Client.describe_profile

demandé il y a 2 ans211 vues
1 réponse
0
Réponse acceptée

The included SDK in the Lambda runtime takes sometime to update to the latest version. I suggest that you include your own version of the SDK and try again.

profile pictureAWS
EXPERT
Uri
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions