Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

434
Views
Serverless framework, handler doesn't exists

I'm using the Serverless framework to deploy my PHP functions on the AWS Lambda. I have tried with a simple example but I can see inside cloudwatch this error:

Handler `/var/task/public/test.hello` doesn't exist

This is my serverless file:

service: symfony-bref

provider:
    name: aws
    region: eu-central-1
    runtime: provided
    environment:
        APP_ENV: prod

plugins:
    - ./vendor/bref/bref

functions:
    api:
        handler: public/index.php
        description: ''
        timeout: 30 # in seconds (API Gateway has a timeout of 30 seconds)
        layers:
            - ${bref:layer.php-73-fpm}
        events:
            -   http: 'ANY /'
            -   http: 'ANY /{proxy+}'

    S3Handler:
        handler: public/test.hello
        layers:
            - ${bref:layer.php-73}
        events:
            - s3:
                bucket: ${ssm:/symfony-bref/AWS_S3_BUCKET_NAME:1}
                event: s3:ObjectCreated:*
                existing: true

and my functions test.php is inside the folder public:

<?php


function hello($eventData) : array
{
    return ["msg" => "hello from PHP " . PHP_VERSION];
}

What can I do for function S3Handler? Api function is working fine.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I see you have added controller as controller: public/index.php in serverless.uml file, but its filename is test.php. Looks like a typo to me

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!