MissingParentDirectory when Deploying python application as an image in aws lambda with subfolders

Viewed 81

I am trying to deploy a python application as a image in aws lambda.

The image gets built and works fine locally but when we try to deploy it in lambda it throws MissingParentDirectory error if the project has any subdirectories.

If anyone has faced this issue. Please let us know the solution.

1 Answers

I don't know if you found the solution in the meantime but maybe someone else stumbles over this post and this is the solution that worked for me.

RUN mkdir -p <COMPLETE_PARENT_PATH>

This will create all folders up until the point your file is located and assures the parent directory really exists.

Related