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?

asked a year ago234 views
1 Answer
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
answered a year 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