I have modified the framework directories and the required files from yii2 framework structure.
For example, I just need backend folder and it’s structure. I don’t need Yii2 Frontend Folder and common so I removed all unnecessary folders, and libraries from the composer.
I have developed the code and deployed successfully in lambda using https://bref.sh using web app approach.
I can call the lambda function using http gateway. However I am looking the solution for event driven approach.
To make the picture very clear.
Web App Approach:
- Deployed code to lambda
- Attached HTTP as event
- Once serverless deploy successful it will give URL as a response.
- Call the URL and function will be called.
Event Driven Approach:
I would like to call the lambda function when there is a message in SQS.
So for example:
- Deployed code to lambda
- Attach the lambda to SQS by using events and SQS ARN
- so when there is a new message in SQS it will automatically call the lambda function.
Error I got while trigger the function using event test in lambda
Handler `/var/task/backend/web/index.php` must return a function or object handler. See https://bref.sh/docs/runtimes/function.html
Is there anyone who did this?
@samdark can you please provide some solution?