I want to access my lambda layer via Cloud9

0

I have developed some code on my local PC from which I created a lambda function which contains environment variables and a layer with my libraries. When I run the code it works. I have decided that I really should be developing this code using Cloud9 so I can debug it when I make more changes. I have been able to access my code OK via the AWS explorer but when I attempt to run it I notice that it falls over because it cannot locate a library. I realise it is not accessing the layer I uploaded, the error message is "ModuleNotFoundError: No module named 'tweepy'". So how do I access the existing Lambda layer I created, but this time in Cloud9?

feita há um ano241 visualizações
1 Resposta
1

In context of this scenario, Cloud9, is just like your desktop. It does not have visibility to Lambda function or layers any more than your desktop.

You can achieve this by using AWS SAM. This article explains how you can use AWS SAM to download and cache external layers - https://aws.amazon.com/blogs/compute/working-with-aws-lambda-and-lambda-layers-in-aws-sam/

AWS
respondido há um ano

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