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?

질문됨 일 년 전241회 조회
1개 답변
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
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠