I am working to set up AWS Lambda with a PHP application. I have been able to set up the basic functionality as documented here: https://aws.amazon.com/blogs/compute/building-php-lambda-functions-with-docker-container-images/
I have the following Dockerfile:
FROM bref/php-80-fpm
RUN curl -s https://getcomposer.org/installer | php
RUN php composer.phar require bref/bref
COPY . /var/task
CMD _HANDLER=index.php /opt/bootstrap
When I run a test on Lambda I get an error: entrypoint requires the handler name to be the first argument
I see in the linked post above there is a comment in the Dockerfile stating that this line sets the entry point:
#set the function handler entry point
CMD _HANDLER=index.php /opt/bootstrap
But I'm not sure what that line means. The index.php file should be used as an entrypoint for my app but I don't know what /opt/bootstrap does.
Is someone able to explain what the entrypoint here is and how I would troubleshoot it?