Questions tagged [bref]

Use this tag for questions related to PHP projects deployed with Bref on AWS Lambda.

Bref is a project to help deploy serverless PHP applications on AWS Lambda.

In case of a bug it is better to open an issue on the GitHub project.

35 questions
11
votes
1 answer

Deploying Laravel (laravel-mix) application on AWS Serverless platform

I'm trying to deploy my Laravel application on AWS serverless platform, I'm using dynamic imports and code splitting in my laravel-mix to compile the assets, to execute this I followed the steps in the documentation of bref package I installed the…
Nitish Kumar
  • 6,054
  • 21
  • 82
  • 148
4
votes
1 answer

binary responses with Serverless, Bref PHP, and Slim getting CORS or base64 encoded

I have been setting up a Serverless(.com) setup with AWS, using Bref (PHP layer) to run MPDF to convert HTML to PDF using AWS Lambda and API Gateway. Following instructions,.. here is the setup. After way to much debugging, it appears that either I…
O. Mills
  • 216
  • 2
  • 10
3
votes
1 answer

How do you calculate an AWS signature in PHP?

I am writing a webhook in bref and want it to send a message to SQS. Using the entire AWS SDK for this is a colossal waste. How could I calculate the signature?
chx
  • 11,270
  • 7
  • 55
  • 129
2
votes
1 answer

How to install GD Library? Laravel at AWS Lambda with Bref

When using Intervention\Image in laravel on lambda The following error has occurred. By the way, it works in the local environment. I have to add gd. [2021-08-17 10:37:18] DEV.ERROR: GD Library extension not available with this PHP…
2
votes
2 answers

AWS Lambda send SMS via AWS-PHP-SDK doesn't work

Problem description: I am unable to send SMS from AWS Lambda. Controller Code try { $sms = AwsFacade::createClient('sns'); $result = $sms->publish([ 'MessageAttributes' => [ 'AWS.SNS.SMS.SenderID' =>…
CyQuer
  • 21
  • 2
2
votes
1 answer

Can't run a serverless & bref basic example locally

I want to run a basic example of serverless & bref example. What I did: npm install -g serverless composer require bref/bref vendor/bin/bref init serverless invoke local -f hello --docker I getting this error: Miroslavs-MacBook-Air:testing…
kole90s
  • 67
  • 1
  • 1
  • 8
1
vote
1 answer

Unable to invoke symfony console command via "aws lambda invoke"

I'm trying to run symfony "bin/console" command like described in documentation. Running command aws lambda invoke \ --function-name PhpCliLambdaName \ --region us-east-1 \ --cli-binary-format raw-in-base64-out \ --payload '"d:s:u…
ffx14
  • 1,825
  • 2
  • 14
  • 19
1
vote
0 answers

Loading Laravel into a Lambda handler

We're using Bref to run a Laravel REST API on Lambda functions. Everything works except now that we're trying to use Cognito. Particularly, we'd like to be able to handle Cognito's post confirmation event. We are able to receive the event and read…
clueless
  • 839
  • 1
  • 10
  • 24
1
vote
0 answers

Problem with layer when using serverless-offline with Bref

I'm trying to run a Symfony application with Bref and serverless-offline. I know that Bref doesn't officially support serverless-offline, but I want to give it a shot; this thread - https://github.com/brefphp/bref/issues/875 - implies that it should…
umulmrum
  • 153
  • 1
  • 8
1
vote
1 answer

Running PHP-FPM with Bref on LocalStack Lambda

I'm trying to run a (Symfony) PHP application on LocalStack (AWS Lambda). As recommended by the Bref docs, I use the ${bref:layer.php-81-fpm} layer. Invoking a function fails and the LocalStack logs say: ALERT: [pool default] user has not been…
umulmrum
  • 153
  • 1
  • 8
1
vote
1 answer

Bref PHP stores sessions in redis but can't read it

I'm trying to use redis as session driver of a lambda running bref php. It writes the data as expected(I can see it using redis-cli) and stores on $_SERVER, but when you refresh the page, session is empty. I'm not using frameworks, just pure…
Éder Rocha
  • 1,538
  • 11
  • 29
1
vote
0 answers

How to fix Bref serverless deploy not enough memory error?

I’m using an Ubuntu 16.04 local server in a vagrant box. I use Laravel 8 as my framework. When I use bref.sh to deploy my code to serverless it pops below error Cannot read file…
1
vote
0 answers

AWS lambda in laravel using bref

I created a project of AWS lambda in laravel using bref package and i am getting the following error { "errorType": "Bref\\Event\\InvalidLambdaEvent", "errorMessage": "This handler expected to be invoked with a API Gateway or ALB event.…
shruti
  • 56
  • 6
1
vote
0 answers

Serverless Laravel deploy issue

I have created my larvel application and try to deploy it on AWS lambda so I have used bref & serverless framework for that , but website link give me blank page , and when I have back to cloudwatch for see the logs and this what exists cloudwatch…
devops learn
  • 51
  • 1
  • 5
1
vote
1 answer

Serverless PHP on AWS with bref deployment error

I recently discovered what promises to be the holy grail of PHP development on AWS Lambda. It's a tool called "bref" which simplifies the way PHP apps are deployed to the cloud. The online documentation has simple and clear instructions to follow…
Keith Harris
  • 1,118
  • 3
  • 13
  • 25
1
2 3