-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rules_oci@v2beta1 - Image not compatible with AWS lambdas #645
Comments
Could be a bug. It would help me a lot debugging if you could provide a reproducer for this. |
I thought I'd added this to this bug but it was only on the slack channel. It's hard to give repro instructions because I don't understand the AWS infra enough and this part is buried under a ton of TF code from me. But after inspecting the two images (rules_oci v1 vs v2) I suspect the problem comes from the missing history entries for the docker layers. The v2 image does not have
I suspect AWS assumes that |
fixed by #654 |
Sadly this didn't fix it. I have a support case open with AWS trying to figure out what's going on |
Ok we found the root cause. It seems that AWS Lambdas are not happy when the layers have different This seems to be a bug on the AWS side since it does not seem like mixing media types violates the OCI spec. |
@juanzolotoochin Is that the only change you made? Could you let me know if you are using pkg_tar() or tar() rule? I'm facing the same issue and the different mediaType was also my first guess, but know they are all "application/vnd.docker.image.rootfs.diff.tar.gzip" and AWS Lambda still rejects the image. |
Here's how I debugged this:
In my case, I was using |
I have myself had this problem as well, ensuring all the layers have same compression and all the directories have a parent directory in the image tree makes it work. Unfortunately there is nothing we can do to ensure this for you, it's up to the user. |
For |
Okay bazel-contrib/bazel-lib#783 is where we track the upstream issue for |
AWS allows to create lambdas using container image, see https://docs.aws.amazon.com/lambda/latest/dg/images-create.html.
We are seeing the following error when trying to run a lambda built with version 2beta1 of
rules_oci
:The exact same image works fine when using
rules_oci
v1.The text was updated successfully, but these errors were encountered: