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).
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
Any other information?
No response