aspect-build / aspect-build/rules_aws
[Bug]: Lambda Deployment fails with "InvalidImage: MissingParentDirectory: Parent directory does not exist for file: ..."
- Dominant language
- Starlark
- Stars
- 18
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
### What happened?
When building the tar file, if there are folders (in my case dependencies, but this will likely happen with any tar archive) AWS would reject the resulting image with a message similar to:
```
InvalidImage: MissingParentDirectory: Parent directory does not exist for file: zipp/__init__.py
```
Turns out this is caused by the fact that only the top level directory is added to the tar archive (confirmed using the process outlined [here](https://repost.aws/questions/QUx_W7JnkvTdqGhQ2LglQ8dA/lambda-function-from-container-missing-parent-directory)).
### Version
Development (host) and target OS/architectures: x86_64
Output of `bazel --version`: bazel 8.1.0
Version of the Aspect rules, or other relevant rules from your
`WORKSPACE` or `MODULE.bazel` file:
Language(s) and/or frameworks involved: Python
### How to reproduce
```shell
```
### Any other information?
_No response_
Contributor guide
Research direction
Start by locating the Lambda image tar/archive creation path in the rules_aws repository and inspect how nested Python dependency files are added. Reproduce with a dependency such as zipp/__init__.py, then verify that the archive includes the required parent directories and that AWS accepts the resulting image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- build-system, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 44/100