laravel-bridge
laravel-bridge copied to clipboard
Exiting without providing any reason
I'm trying to use this project in a containerized fashion with Lambda (there's not a lot of docs for using Docker). I've been through the docs here and through Bref and am unsure what I'm missing/doing wrong. When processing lobs locally and within AWS I get the error:
{
"errorMessage": "RequestId: 36907a63-97ff-478b-b1fd-630f060a8661 Error: Runtime exited without providing a reason",
"errorType": "Runtime.ExitError"
}
Locally I'm able to use serverless invoke -f worker --file=sqs-queue-event.json
to tell my local env to process the job. However both locally and in AWS that's the only feedback I get, with no errors or anything on the Laravel side. It just doesn't work 🤷 . Logs are configured to go to stderr locally and bugsnag/stderr in Lambda.
My Dockerfile
:
FROM bref/php-80
ADD . /var/task
# production-ready dependencies
RUN curl -s https://getcomposer.org/installer | php \
&& php composer.phar install --no-interaction --optimize-autoloader --no-dev --prefer-dist --no-cache \
&& rm composer.phar
ENTRYPOINT ["php", "worker.php"]
My container is defined within the serverless architecture as:
functions:
worker:
reservedConcurrency: 10
image: xxxxx.xxxxx.amazonaws.com/[project]:lambda-serverless
events:
# Declares that our worker is triggered by jobs in SQS
- sqs:
arn: !GetAtt SendMessagesQueue.Arn
# If you create the queue manually, the line above could be:
# arn: 'arn:aws:sqs:us-east-1:1234567890:my_sqs_queue'
# Only 1 item at a time to simplify error handling
batchSize: 1