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

posta 2 anni fa211 visualizzazioni
1 Risposta
0
Risposta accettata

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
ESPERTO
Uri
con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande