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
1
vote
1 answer

How do I pass command line arguments to a Lambda function in Serverless/Bref?

I am running a Symfony 4 (PHP) application on AWS Lambda using Bref (which uses Serverless). Bref provides a layer for Symfony's bin/console binary. The Serverless config for the Lambda function looks like this: functions: console: …
amacrobert
  • 2,707
  • 2
  • 28
  • 37
0
votes
0 answers

serverless deploy : Cannot read properties of undefined (reading 'enum') at new ServerlessPlugin

I am getting error in laravel when i am running command: serverless deploy TypeError: Cannot read properties of undefined (reading 'enum') at new ServerlessPlugin (/home/softuvo/.local/share/Trash/files/laravel-bref/laravel- how to solve this…
0
votes
1 answer

How to upload dynamically generated file to S3 bucket using lambda with PHP?

Using bref as PHP serverless framework. Problem: Unable to upload the dynamically generated file to S3 bucket from Lambda using PHP Code: serverless.yml service: lambdaToS3 provider: name: aws region: ap-southeast-2 runtime:…
Sahil Patel
  • 1,570
  • 2
  • 15
  • 34
0
votes
1 answer

Error AWS SQS POST job, with Laravel on serverless

I have a Laravel api with Serverless that connects to the AWS Lambda service, which tries to do a simple Job as the Laravel documentation advises (https://laravel.com/docs/7.x/queues#dispatching-jobs). my ProcessPodcast job try a SQS service, but…
0
votes
1 answer

Laravel Migrate to AWS RDS using Lambda

I am looking to deploy a Laravel app on AWS Lambda. The app requires a PostgreSQL database access. The idea is am using Bref to deploy on AWS Lambda. I created a RDS PostgreSQL database manually and updated the inbound rule and added the connection…
0
votes
1 answer

An error occured: ArtisanLambdaFunction - Unzipped size must be smaller than 220606645 bytes (Service: Lambda, Status Code: 4000

I was trying to deploy my Laravel application to AWS Lambda using Bref. I tried to exclude almost all the images, videos and still I am getting Serverless Error ---------------------------------------- An error occurred: ArtisanLambdaFunction -…
0
votes
1 answer

bref.sh php container for AWS Lambda with Neos CMS

I'm struggling to get Neos (a php based cms) to run in a docker container for AWS Lambda. I guess I have somewhere a misunderstanding and hope anyone can help. What I did so far: I adjusted Neos so that all cache files will be written to the tmp…
kapale
  • 535
  • 1
  • 7
  • 15
0
votes
1 answer

Error libncurses.so.6 when using Bref Lambda custom runtime with AWS CDK

I am trying to use Bref custom runtime in AWS Lambda using AWS CDK instead of Serverless. The CDK code is like below. const region = cdk.Stack.of(this).region; //arn:aws:lambda:ap-southeast-1:209497400698:layer:php-74:18 const…
Petra Barus
  • 3,815
  • 8
  • 48
  • 87
0
votes
2 answers

How could a SQS worker written with bref signal a retry?

After setting batchSize: 1 how should the worker indicate success and how should it indicate temporary failure / ask for a retry? I read https://docs.aws.amazon.com/lambda/latest/dg/invocation-retries.html but it obviously doesn't cover a custom…
chx
  • 11,270
  • 7
  • 55
  • 129
0
votes
1 answer

CakePHP - Router::url() generating url relative to current page

I'm trying to replace all of my static routes with the CakePHP 3.8 Router::url() method. On my local environment, when accessing the the below code from the manage/lender-products/read/2 route, I get the expected results of /manage/lenders from the…
Ari Molzer
  • 11
  • 1
0
votes
3 answers

Error Executing Listobjects from S3 using Bref Laravel Lambda functions

I am trying to get my assets stored in S3 by calling a API implemented as Lambda function using Bref Serverless Package. I am using Laravel. A call to Storage::directories(); give the following error. message: Error executing "ListObjects" on…
0
votes
0 answers

laravel aws serverless after login expired 419

I have Laravel 7 bref deploy to aws serverless. after login, laravel create 3 session to database session but the result show 419 page expired (SESSION_DRIVER=database). tried using the SESSION_DRIVER=cookie, but the result is still the same 419…
Gzai Kun
  • 148
  • 1
  • 12
0
votes
0 answers

Internal server error after download on s3 bucket from aws lambda , PHP

I created aws lambda function based on laravel framework using bref. Link: https://bref.sh this is my code to download using media library spartie $mediaItem = Media::where('model_id',$id)->where('model_type','App\MODEL')->first(); return…
0
votes
2 answers

Amazon AWS Cognito Lambda Triggers Not Working With Simple PHP BREF Function

I recently started experimenting with using the bref (https://bref.sh/docs/) package to use PHP for Lambda functions on Amazon AWS. I'm able to use this package perfectly fine to upload a simple Lambda function, as simple as it can…
BClarkOMP
  • 41
  • 1
  • 1
  • 6
0
votes
3 answers

Why Bref cannot load bootstrap: "Error: Couldn't find valid bootstrap(s): [/var/task/bootstrap /opt/bootstrap]"?

I am investigating on how I can create an AWS lambda in php using the bref library Therefore, according to documentation I set up the environment with the following command cocktail: sudo -H npm install -g serverless composer require…
Dimitrios Desyllas
  • 9,082
  • 15
  • 74
  • 164