First: run the docker image of the Lambda runtime (https://docs.aws.amazon.com/es_es/lambda/latest/dg/current-supported-versions.html):
docker run -it --name php-lambda-layer --rm amazonlinux:2017.03.1.20170812 bash
Inside docker, run the following commands: