user9040429
user9040429

Reputation: 720

Unable to import python package in AWS SAM local development

I am using AWS sam cli to develop python application locally first. I have used sam build command to install python packages mentioned in requirements.txt. Build folder is created with the dependency package folders, But in the code, the import statements are showing could not import the package. Though it is present in the same folder as of my code.

Upvotes: 0

Views: 602

Answers (1)

Kerolos William
Kerolos William

Reputation: 481

The Error message is show cause the imported package aren't installed as a python package since SAM CLI install the packages inside the project path so it can be packaged as layers and deployed in to AWS Lambda Layers

Upvotes: 0

Related Questions