This repo builds and can deploy php layer in aws lambda
1.5K
This is a pre-complied Lambda layer for PHP
build date: (7.4.0 release date: Nov 28, 2019)
aws lambda publish-layer-version --layer-name LAMBDA-LAYER-PHP --content S3Bucket=rkh-pub,S3Key=lambda-layer-php/php-latest.zip
This aws command will create a layer called 'LAMBDA-LAYER-PHP' into your AWS account.
git clone [email protected]:rkhtech/lambda-layer-php.git
cd lambda-layer-php
./build.sh
This will produce a local file called: php-7.4.6.zip in your local directory. You can use this file to publish your lambda layer.
aws lambda publish-layer-version --layer-name LAMBDA-LAYER-PHP --zip-file fileb://content.zip --compatible-runtimes provided
This will deploy the lambda layer called 'php74' to aws lambda.
If the layer already exists then it will deploy a new version of the layer with the same name.
### Expected output:
```json
{
"Content": {
"CodeSize": 26559645,
"CodeSha256": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Location": "https://awslambda-us-west-2-layers.s3.us-west-2.amazonaws.com/snapshots/000000000000/php73-xxxxxxxxxxxxxxxxxx"
},
"LayerVersionArn": "arn:aws:lambda:us-west-2:000000000000:layer:php74:15",
"Version": 15,
"Description": "",
"CreatedDate": "2019-08-16T23:56:44.202+0000",
"LayerArn": "arn:aws:lambda:us-west-2:000000000000:layer:php74"
}
Content type
Image
Digest
Size
765.5 MB
Last updated
about 6 years ago
docker pull rkhtech/lambda-layer-php