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

asked 2 years ago207 views
1 Answer
0
Accepted Answer

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
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions