aws lambda + php + sam-cli
- AWS CLI already configured with Administrator permission
- Docker installed
- SAM CLI - Install the SAM CLI
In this example we use the built-in sam build
to build a docker image from a Dockerfile and then copy the source of your application inside the Docker image.
Read more about SAM Build here
Invoking function locally through local API Gateway
sam build
sam local start-api
To deploy your application for the first time, run the following in your shell:
sam deploy --guided
準備中
-
sam build
でphp実行コンテナをビルドできるように - composer.json を用意してコンテナビルド内でcomposer installするように
- phpunitを用意する
- codebuildでデプロイできるように