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

feita há 2 anos211 visualizações
1 Resposta
0
Resposta aceita

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
ESPECIALISTA
Uri
respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas