All Projects → araines → Serverless Php

araines / Serverless Php

Licence: mit
PHP for AWS Lambda via Serverless Framework

Projects that are alternatives of or similar to Serverless Php

Serverless With Next5 Boilerplate
Serverless.js with Next.js 5 on AWS, powered by the Serverless Framework
Stars: ✭ 100 (-34.21%)
Mutual labels:  serverless, serverless-framework
Awesome Layers
λ A curated list of awesome AWS Lambda Layers. Sponsored by https://cloudash.dev
Stars: ✭ 1,655 (+988.82%)
Mutual labels:  serverless, serverless-framework
Serverless
⚡ Serverless Framework – Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more! –
Stars: ✭ 41,584 (+27257.89%)
Mutual labels:  serverless, serverless-framework
Serverless Sentry Plugin
This plugin adds automatic forwarding of errors and exceptions to Sentry (https://sentry.io) and Serverless (https://serverless.com)
Stars: ✭ 146 (-3.95%)
Mutual labels:  serverless, serverless-framework
Serverless
Serverless 架构应用开发指南 - Serverless Architecture Application Development Guide with Serverless Framework.
Stars: ✭ 1,616 (+963.16%)
Mutual labels:  serverless, serverless-framework
Tencent Express
Easily deploy serverless Express.js applications to Tencent Cloud with the Serverless Framework
Stars: ✭ 96 (-36.84%)
Mutual labels:  serverless, serverless-framework
Serverless Sam
Serverless framework plugin to export AWS SAM templates for a service
Stars: ✭ 143 (-5.92%)
Mutual labels:  serverless, serverless-framework
Examples
Serverless Examples – A collection of boilerplates and examples of serverless architectures built with the Serverless Framework on AWS Lambda, Microsoft Azure, Google Cloud Functions, and more.
Stars: ✭ 9,743 (+6309.87%)
Mutual labels:  serverless, serverless-framework
Serverless Architectures Aws
The code repository for the Serverless Architectures on AWS book
Stars: ✭ 120 (-21.05%)
Mutual labels:  serverless, serverless-framework
Serverless Side Rendering React Next
Sample repo for setting up Next and React on AWS Lambda with the Serverless Framework.
Stars: ✭ 117 (-23.03%)
Mutual labels:  serverless, serverless-framework
Serverless Book
A book about the http://serverless.com Framework v1
Stars: ✭ 144 (-5.26%)
Mutual labels:  serverless, serverless-framework
Serverless Openwhisk
Adds Apache OpenWhisk support to the Serverless Framework!
Stars: ✭ 131 (-13.82%)
Mutual labels:  serverless, serverless-framework
Kinesis Streams Fan Out Kinesis Analytics
Amazon Kinesis Streams fan-out via Kinesis Analytics (powered by the Serverless Framework)
Stars: ✭ 95 (-37.5%)
Mutual labels:  serverless, serverless-framework
Actionserverless
Use GitHub Actions to create a serverless service.
Stars: ✭ 98 (-35.53%)
Mutual labels:  serverless, serverless-framework
Aws Lambda Vpc Nat Examples
Example of setting up AWS lambda function with VPC and NAT
Stars: ✭ 92 (-39.47%)
Mutual labels:  serverless, serverless-framework
Json Serverless
Transform a JSON file into a serverless REST API in AWS cloud
Stars: ✭ 108 (-28.95%)
Mutual labels:  serverless, serverless-framework
Serverless Plugin Git Variables
⚡️ Expose git variables to serverless
Stars: ✭ 75 (-50.66%)
Mutual labels:  serverless, serverless-framework
Serverless Boilerplate
Serverless project template
Stars: ✭ 80 (-47.37%)
Mutual labels:  serverless, serverless-framework
Serverless Docker Image Resize
Simple serverless image resize on-the-fly - Deploy with one command - Built with AWS Lambda and S3
Stars: ✭ 114 (-25%)
Mutual labels:  serverless, serverless-framework
A Crash Course On Serverless Auth
A short and easy boilerplate showcasing JWT auth with Nodejs, the Serverless framework, MongoDB and AWS Lambda.
Stars: ✭ 127 (-16.45%)
Mutual labels:  serverless, serverless-framework

serverless-php

serverless language license

PHP for AWS Lambda via Serverless Framework using Symfony components for dependency injection.

Latest version is on master.

AWS Lambda lets you run code without thinking about servers. Right now you can author your AWS Lambda functions in several langauges natively, but not PHP. This project aims to provide a fully featured shim for authoring your AWS Lambda functions in PHP.

More information about how this works and its performance characteristics can be found on my blog post.

Preview

<?php

use Raines\Serverless\Context;
use Raines\Serverless\Handler;

class HelloHandler implements Handler
{
    public function handle(array $event, Context $context)
    {
        return [
            'statusCode' => 200,
            'body' => 'Hello World!',
        ];
    }
}

Features

Event Data Context Logging Exceptions Environment API Gateway
full full part none full full

Usage

Prerequisites

Install this project:

serverless install --url https://github.com/araines/serverless-php

Currently serverless install does not work with Git LFS. Hopefully this will be supported in the future, but for the moment here are your options:

  1. Rebuild the PHP binary (described later in this document)
  2. Download the PHP binary directly from GitHub
  3. Instead of using serverless install, ensure you have Git LFS installed on your system and clone the repository.

Deploying to AWS

composer install -o --no-dev
serverless deploy

Running locally

serverless invoke local -f hello

Running on AWS

serverless invoke -f hello

Rebuilding PHP Binary

The PHP binary can be built with any flags you require and at any version.

Prerequisites

Compiling

sh buildphp.sh

Altering compile flags etc

Edit buildphp.sh and dockerfile.buildphp to alter it.

Thanks

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].