-
Notifications
You must be signed in to change notification settings - Fork 417
Open
Labels
Description
It's kinda the same problem that was partially fixed in #877
Let's consider a serverless.yml
provider:
name: aws
runtime: nodejs18.x
ecr:
images:
python-image:
path: ./docker/python
functions:
nodeFunction:
handler: bla/bla
pythonFunction:
image:
name: python-image
command: app.handlerWhat will happen?
It will fail miserably by trying to bundle python code with webpack.
Why?
Because provider.runtime: nodejs18.x doesn't mean that every Dockerfile in provider.ecr.images uses FROM public.ecr.aws/lambda/node:18
But it's silently assumed.
I.e. not only image.urishould be excluded from bundling, but any image that is not derived from public.ecr.aws/lambda/node
Just in case, a sample of ./docker/python/Dockerfile:
FROM public.ecr.aws/lambda/python:3.10
COPY app.py .
CMD ["app.handler"]